rename countBytes -> countUtf8Bytes

This commit is contained in:
Folkert 2022-07-03 21:42:32 +02:00
parent 5f2c7c5b5e
commit 5904934887
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
10 changed files with 27 additions and 25 deletions

View file

@ -146,7 +146,7 @@ comptime {
exportStrFn(str.strSplitInPlaceC, "str_split_in_place");
exportStrFn(str.countSegments, "count_segments");
exportStrFn(str.countGraphemeClusters, "count_grapheme_clusters");
exportStrFn(str.countBytes, "count_bytes");
exportStrFn(str.countUtf8Bytes, "count_utf8_bytes");
exportStrFn(str.startsWith, "starts_with");
exportStrFn(str.startsWithScalar, "starts_with_scalar");
exportStrFn(str.endsWith, "ends_with");

View file

@ -1184,7 +1184,7 @@ test "countGraphemeClusters: emojis, ut8, and ascii characters" {
try expectEqual(count, 10);
}
pub fn countBytes(string: RocStr) callconv(.C) usize {
pub fn countUtf8Bytes(string: RocStr) callconv(.C) usize {
return string.len();
}