diff options
author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-10-04 08:26:36 +0000 |
---|---|---|
committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-10-04 08:26:36 +0000 |
commit | a2864032505f0e6d795471e4375dd9a0c668bbc3 (patch) | |
tree | aa4c9f141180faf90c69bbc69386c5e2433f5901 | |
parent | a74737ac7c1526f4ed0f7e5473c7e21289af8de2 (diff) | |
parent | 3abefbd402e0b0e6556231d3ef5e1b0708154760 (diff) |
Merge pull request 'fix(103_tokenization): :pencil2: Migrated to tokenizeAny' (#5) from rond/exercises:main into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/5
-rw-r--r-- | exercises/103_tokenization.zig | 4 | ||||
-rw-r--r-- | patches/patches/103_tokenization.patch | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/exercises/103_tokenization.zig b/exercises/103_tokenization.zig index dba8607..7f59766 100644 --- a/exercises/103_tokenization.zig +++ b/exercises/103_tokenization.zig @@ -62,7 +62,7 @@ // // A standard tokenizer is called (Zig has several) and // // used to locate the positions of the respective separators // // (we remember, space and comma) and pass them to an iterator. -// var it = std.mem.tokenize(u8, input, " ,"); +// var it = std.mem.tokenizeAny(u8, input, " ,"); // // // The iterator can now be processed in a loop and the // // individual numbers can be transferred. @@ -136,7 +136,7 @@ pub fn main() !void { ; // now the tokenizer, but what do we need here? - var it = std.mem.tokenize(u8, poem, ???); + var it = std.mem.tokenizeAny(u8, poem, ???); // print all words and count them var cnt: usize = 0; diff --git a/patches/patches/103_tokenization.patch b/patches/patches/103_tokenization.patch index 973ffe6..8ed8a5e 100644 --- a/patches/patches/103_tokenization.patch +++ b/patches/patches/103_tokenization.patch @@ -1,4 +1,4 @@ 139c139 -< var it = std.mem.tokenize(u8, poem, ???); +< var it = std.mem.tokenizeAny(u8, poem, ???); --- -> var it = std.mem.tokenize(u8, poem, " ,;!\n"); +> var it = std.mem.tokenizeAny(u8, poem, " ,;!\n"); |