commit 4a26f779fee3e6d44a773dce7a0f63d0f5cd8c91 parent cbe691819a15d40b12a37d74ed8c8dd8d8dfc21f Author: Drew DeVault <sir@cmpwn.com> Date: Tue, 2 Feb 2021 14:27:14 -0500 encoding::utf8::valid: improve docs Diffstat:
M | encoding/utf8/decode.ha | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/encoding/utf8/decode.ha b/encoding/utf8/decode.ha @@ -61,9 +61,8 @@ export fn next(d: *decoder) (rune | void | more | invalid) = { }; // Returns true if a given string or byte slice contains only valid UTF-8 -// sequences. Note that a Hare invariant states that all strings are valid -// UTF-8 - if this ever returns false for a str type, someone is doing something -// funny. +// sequences. Note that Hare strings (str) are always valid UTF-8 - if this +// returns false for a str type, something funny is going on. export fn valid(src: (str | []u8)) bool = { let decoder = decode(src); for (true) {