Rename Str.toBytes to Str.toUtf8

This commit is contained in:
Richard Feldman 2021-08-07 21:57:48 -04:00
parent 23e11ca946
commit 2a616103c6
16 changed files with 33 additions and 33 deletions

View file

@ -96,7 +96,7 @@ comptime {
exportStrFn(str.strFromIntC, "from_int");
exportStrFn(str.strFromFloatC, "from_float");
exportStrFn(str.strEqual, "equal");
exportStrFn(str.strToBytesC, "to_bytes");
exportStrFn(str.strToUtf8C, "to_utf8");
exportStrFn(str.fromUtf8C, "from_utf8");
}

View file

@ -1129,8 +1129,8 @@ test "RocStr.joinWith: result is big" {
try expect(roc_result.eq(result));
}
// Str.toBytes
pub fn strToBytesC(arg: RocStr) callconv(.C) RocList {
// Str.toUtf8
pub fn strToUtf8C(arg: RocStr) callconv(.C) RocList {
return @call(.{ .modifier = always_inline }, strToBytes, .{arg});
}