diff options
| author | rond <[email protected]> | 2023-10-04 04:53:34 +0200 |
|---|---|---|
| committer | rond <[email protected]> | 2023-10-04 04:53:34 +0200 |
| commit | 4a3e4474b7790fb721695f04fa6d8e10c3b20b73 (patch) | |
| tree | 6d0ce1f4d8772cc7629f02264ec6ed78dea12c0b | |
| parent | a74737ac7c1526f4ed0f7e5473c7e21289af8de2 (diff) | |
| download | ziglings-4a3e4474b7790fb721695f04fa6d8e10c3b20b73.tar.xz ziglings-4a3e4474b7790fb721695f04fa6d8e10c3b20b73.zip | |
fix(103_tokenization): :pencil2: Migrated to tokenizeAny
The tokenize functions seems to be deprecated as per the docs:
https://ziglang.org/documentation/master/std/#A;std:mem.tokenize
tokenizeAny is aliased to tokenizeAny as per:
https://github.com/ziglang/zig/blob/master/lib/std/mem.zig#L2130C32-L2130C32
| -rw-r--r-- | exercises/103_tokenization.zig | 4 |
1 files changed, 2 insertions, 2 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; |
