commit b3d613259690b701f50e2a03384d59304bc16bd7
parent 0947d632d56874a111d16f1013b79c2282c27f17
Author: Bor Grošelj Simić <bgs@turminal.net>
Date: Fri, 8 Apr 2022 02:37:51 +0200
fix try_fromutf8 docstring
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/strings/utf8.ha b/strings/utf8.ha
@@ -25,7 +25,7 @@ export fn fromutf8(in: []u8) str = {
};
// Converts a byte slice into a string. If the slice contains invalid UTF-8
-// sequences, void is returned instead.
+// sequences, [[encoding::utf8::invalid]] is returned instead.
export fn try_fromutf8(in: []u8) (str | utf8::invalid) = {
let s = fromutf8_unsafe(in);
if (!utf8::valid(s)) {