hare

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

commit 57178c5004ebe5b36f81259d05f691e664337e6d
parent 918bb0d37dec1f0462ba468e6c22cc9d2842aa64
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  1 Apr 2023 18:29:51 -0400

{bytes, strings}::tokenize: fix param name in docs

Diffstat:
Mbytes/tokenize.ha | 4++--
Mstrings/tokenize.ha | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bytes/tokenize.ha b/bytes/tokenize.ha @@ -11,8 +11,8 @@ export type tokenizer = struct { }; // Returns a tokenizer which yields sub-slices tokenized by a delimiter, starting -// at the beginning of the slice. The caller must ensure that 'delimiter' is not -// an empty slice. Can tokenize a slice of length less than [[types::I64_MAX]]. +// at the beginning of the slice. The caller must ensure that 'delim' is not an +// empty slice. Can tokenize a slice of length less than [[types::I64_MAX]]. export fn tokenize(s: []u8, delim: []u8) tokenizer = { assert(len(delim) > 0, "bytes::tokenize called with empty slice"); if (len(s) == 0) { diff --git a/strings/tokenize.ha b/strings/tokenize.ha @@ -18,7 +18,7 @@ export type tokenizer = bytes::tokenizer; // 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. +// The caller must ensure that 'delim' is not an empty string. export fn tokenize(s: str, delim: str) tokenizer = bytes::tokenize(toutf8(s), toutf8(delim));