File tree Expand file tree Collapse file tree 7 files changed +8
-8
lines changed
Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1818 submodules : true
1919 - uses : goto-bus-stop/setup-zig@v2
2020 with :
21- version : 0.11 .0
21+ version : 0.13 .0
2222 - name : Build
2323 run : zig build test
Original file line number Diff line number Diff line change 1- zig-cache /
1+ . zig-cache /
Original file line number Diff line number Diff line change 33![ CI] ( https://github.com/ziglibs/zig-string-searching/workflows/CI/badge.svg )
44
55Implementation of some string-search algorithms in
6- [ zig] ( https://ziglang.org ) . Compatible with zig v0.11 .0.
6+ [ zig] ( https://ziglang.org ) . Compatible with zig 0.13 .0.
77
88### Boyer-Moore string searching
99
Original file line number Diff line number Diff line change 1- const Builder = @import ("std" ).build . Builder ;
1+ const Build = @import ("std" ).Build ;
22
3- pub fn build (b : * Builder ) void {
3+ pub fn build (b : * Build ) void {
44 const target = b .standardTargetOptions (.{});
55 const optimize = b .standardOptimizeOption (.{});
66
77 const main_tests = b .addTest (.{
8- .root_source_file = .{ . path = "src/main.zig" } ,
8+ .root_source_file = b . path ( "src/main.zig" ) ,
99 .target = target ,
1010 .optimize = optimize ,
1111 });
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub fn bitap(
1414 text : T ,
1515 pattern : T ,
1616) ? usize {
17- assert (std .meta .trait .isIndexable (T ));
1817 const ElemType = std .meta .Elem (T );
1918 assert (@typeInfo (ElemType ) == .Int );
2019 assert (pattern .len <= max_pattern_length );
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ const test_suites = @import("test_cases.zig").test_suites;
77const possibleValues = @import ("common.zig" ).possibleValues ;
88
99pub fn StringFinder (comptime T : type ) type {
10- assert (std .meta .trait .isIndexable (T ));
1110 const ElemType = std .meta .Elem (T );
1211 assert (@typeInfo (ElemType ) == .Int );
1312
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ const test_suites = @import("test_cases.zig").test_suites;
77pub fn byteRabinKarp (text : []const u8 , pattern : []const u8 ) ? usize {
88 const hashFn = struct {
99 pub fn f (str : []const u8 ) usize {
10+ // TODO
1011 return 0 ;
1112 }
1213 }.f ;
1314
1415 const continueHashFn = struct {
1516 pub fn f (h : usize , x : u8 ) usize {
17+ // TODO
1618 return 0 ;
1719 }
1820 }.f ;
You can’t perform that action at this time.
0 commit comments