hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 08b027326d8bcf627b315d73c6ecc7810305773d
parent 4e6aa2771b46f73b3be560221ddc57bb8ef54d61
Author: Romain Reignier <romain@reignier.sh>
Date:   Sun,  4 Dec 2022 22:36:32 +0100

strings::tokenize: fix example

Signed-off-by: Romain Reignier <romain@reignier.sh>

Diffstat:
Mstrings/tokenize.ha | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/strings/tokenize.ha b/strings/tokenize.ha @@ -12,10 +12,10 @@ export type tokenizer = bytes::tokenizer; // Returns a tokenizer which yields sub-strings tokenized by a delimiter. // // let tok = strings::tokenize("hello, my name is drew", " "); -// assert(strings::next_token(tok) as str == "hello,"); -// assert(strings::next_token(tok) as str == "my"); -// assert(strings::next_token(tok) as str == "name"); -// assert(strings::remaining_tokens(tok) == "is drew"); +// assert(strings::next_token(&tok) as str == "hello,"); +// assert(strings::next_token(&tok) as str == "my"); +// assert(strings::next_token(&tok) as str == "name"); +// assert(strings::remaining_tokens(&tok) == "is drew"); // // The caller must ensure that 'delimiter' is not an empty string. export fn tokenize(s: str, delim: str) tokenizer =