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 18
18
submodules : true
19
19
- uses : goto-bus-stop/setup-zig@v2
20
20
with :
21
- version : 0.11 .0
21
+ version : 0.13 .0
22
22
- name : Build
23
23
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 3
3
![ CI] ( https://github.com/ziglibs/zig-string-searching/workflows/CI/badge.svg )
4
4
5
5
Implementation 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.
7
7
8
8
### Boyer-Moore string searching
9
9
Original file line number Diff line number Diff line change 1
- const Builder = @import ("std" ).build . Builder ;
1
+ const Build = @import ("std" ).Build ;
2
2
3
- pub fn build (b : * Builder ) void {
3
+ pub fn build (b : * Build ) void {
4
4
const target = b .standardTargetOptions (.{});
5
5
const optimize = b .standardOptimizeOption (.{});
6
6
7
7
const main_tests = b .addTest (.{
8
- .root_source_file = .{ . path = "src/main.zig" } ,
8
+ .root_source_file = b . path ( "src/main.zig" ) ,
9
9
.target = target ,
10
10
.optimize = optimize ,
11
11
});
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub fn bitap(
14
14
text : T ,
15
15
pattern : T ,
16
16
) ? usize {
17
- assert (std .meta .trait .isIndexable (T ));
18
17
const ElemType = std .meta .Elem (T );
19
18
assert (@typeInfo (ElemType ) == .Int );
20
19
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;
7
7
const possibleValues = @import ("common.zig" ).possibleValues ;
8
8
9
9
pub fn StringFinder (comptime T : type ) type {
10
- assert (std .meta .trait .isIndexable (T ));
11
10
const ElemType = std .meta .Elem (T );
12
11
assert (@typeInfo (ElemType ) == .Int );
13
12
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ const test_suites = @import("test_cases.zig").test_suites;
7
7
pub fn byteRabinKarp (text : []const u8 , pattern : []const u8 ) ? usize {
8
8
const hashFn = struct {
9
9
pub fn f (str : []const u8 ) usize {
10
+ // TODO
10
11
return 0 ;
11
12
}
12
13
}.f ;
13
14
14
15
const continueHashFn = struct {
15
16
pub fn f (h : usize , x : u8 ) usize {
17
+ // TODO
16
18
return 0 ;
17
19
}
18
20
}.f ;
You can’t perform that action at this time.
0 commit comments