rename str.len to str.number_of_bytes

This commit is contained in:
Folkert 2020-12-03 21:23:07 +01:00
parent 22d798b7c7
commit 82e87d04e3
5 changed files with 15 additions and 48 deletions

View file

@ -21,7 +21,7 @@ comptime {
exportStrFn(str.startsWith, "starts_with");
exportStrFn(str.endsWith, "ends_with");
exportStrFn(str.strConcat, "concat");
exportStrFn(str.strLen, "len");
exportStrFn(str.strNumberOfBytes, "number_of_bytes");
}
// Export helpers - Must be run inside a comptime

View file

@ -206,7 +206,7 @@ const RocStr = extern struct {
// Str.numberOfBytes
pub fn strLen(string: RocStr) callconv(.C) u64 {
pub fn strNumberOfBytes(string: RocStr) callconv(.C) u64 {
return string.len();
}