implement startsWith builtin using Zig

This commit is contained in:
Sébastien Besnier 2020-11-22 21:48:42 +01:00
parent b615b0127c
commit b36c2bf499
5 changed files with 130 additions and 113 deletions

View file

@ -15,6 +15,7 @@ const str = @import("str.zig");
comptime { exportStrFn(str.strSplitInPlace, "str_split_in_place"); }
comptime { exportStrFn(str.countSegments, "count_segments"); }
comptime { exportStrFn(str.countGraphemeClusters, "count_grapheme_clusters"); }
comptime { exportStrFn(str.startsWith, "starts_with"); }
// Export helpers - Must be run inside a comptime
fn exportBuiltinFn(comptime fn_target: anytype, comptime fn_name: []const u8) void {