Support Num.toStr for f32, f64

This commit is contained in:
Ayaz Hafiz 2022-07-13 12:13:01 -04:00
parent 6ac9c37e06
commit b7c312d449
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
7 changed files with 79 additions and 14 deletions

View file

@ -152,7 +152,6 @@ comptime {
exportStrFn(str.strConcatC, "concat");
exportStrFn(str.strJoinWithC, "joinWith");
exportStrFn(str.strNumberOfBytes, "number_of_bytes");
exportStrFn(str.strFromFloatC, "from_float");
exportStrFn(str.strEqual, "equal");
exportStrFn(str.substringUnsafe, "substring_unsafe");
exportStrFn(str.getUnsafe, "get_unsafe");
@ -173,6 +172,7 @@ comptime {
}
inline for (FLOATS) |T| {
str.exportFromFloat(T, ROC_BUILTINS ++ "." ++ STR ++ ".from_float.");
num.exportParseFloat(T, ROC_BUILTINS ++ "." ++ STR ++ ".to_float.");
}
}