commit aa3e83fd9c0e0d98e384f09c310bc85daea1c927
parent 8af6338b5b4a1e7dc3e40362d17e44d357bc33bf
Author: Ember Sawady <ecs@d2evs.net>
Date: Sat, 20 May 2023 18:23:09 +0000
strings: fix usage of fully qualified identifiers
Signed-off-by: Ember Sawady <ecs@d2evs.net>
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/strings/pad.ha b/strings/pad.ha
@@ -10,7 +10,7 @@ export fn padstart(s: str, prefix: rune, target_len: size) str = {
};
let res: []u8 = alloc([], target_len);
for (let i = 0z; i < target_len - len(s); i += 1) {
- append(res, encoding::utf8::encoderune(prefix)...);
+ append(res, utf8::encoderune(prefix)...);
};
append(res, toutf8(s)...);
return fromutf8_unsafe(res[..target_len]);
@@ -39,7 +39,7 @@ export fn padend(s: str, prefix: rune, target_len: size) str = {
let res: []u8 = alloc([], target_len);
append(res, toutf8(s)...);
for (let i = 0z; i < target_len - len(s); i += 1) {
- append(res, encoding::utf8::encoderune(prefix)...);
+ append(res, utf8::encoderune(prefix)...);
};
return fromutf8_unsafe(res[..target_len]);
};
diff --git a/strings/runes.ha b/strings/runes.ha
@@ -21,7 +21,7 @@ export fn runes(s: str) []rune = {
export fn fromrunes(rs: []rune) str = {
let bytes: []u8 = [];
for (let i = 0z; i < len(rs); i += 1) {
- const bs = encoding::utf8::encoderune(rs[i]);
+ const bs = utf8::encoderune(rs[i]);
append(bytes, bs...);
};
return fromutf8(bytes)!;