aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2023-10-05 20:13:43 +0000
committerChris Boesch <chrboesch@noreply.codeberg.org>2023-10-05 20:13:43 +0000
commit2ba613b14f658ca0846098b5b3f6752c68f8defd (patch)
treef14a3a505210a49400618c8e80b24f57a039b80c
parent6079b0122a89708c0c3853dbdce1e8aef05ebfcc (diff)
parent5d3ff86a426679e6e02aa284e81c8ed81ff8cc34 (diff)
Merge pull request 'changed tokenize to tokenizeAny' (#10) from fix_tokenization into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/10
-rw-r--r--patches/patches/103_tokenization.patch15
1 files changed, 3 insertions, 12 deletions
diff --git a/patches/patches/103_tokenization.patch b/patches/patches/103_tokenization.patch
index 5fab36d..01d68fc 100644
--- a/patches/patches/103_tokenization.patch
+++ b/patches/patches/103_tokenization.patch
@@ -1,20 +1,11 @@
---- exercises/103_tokenization.zig 2023-10-05 21:29:56.965283604 +0200
-+++ answers/103_tokenization.zig 2023-10-05 21:30:19.815708910 +0200
-@@ -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.tokenizeAny(u8, input, " ,");
-+// var it = std.mem.tokenize(u8, input, " ,");
- //
- // // The iterator can now be processed in a loop and the
- // // individual numbers can be transferred.
+--- exercises/103_tokenization.zig 2023-10-05 21:57:23.245974688 +0200
++++ answers/103_tokenization.zig 2023-10-05 22:06:08.319119156 +0200
@@ -136,7 +136,7 @@
;
// now the tokenizer, but what do we need here?
- var it = std.mem.tokenizeAny(u8, poem, ???);
-+ var it = std.mem.tokenize(u8, poem, " ,;!\n");
++ var it = std.mem.tokenizeAny(u8, poem, " ,;!\n");
// print all words and count them
var cnt: usize = 0;