mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge pull request #3525 from rtfeldman/3522
Num.toStr for f32, f64, Dec
This commit is contained in:
commit
da7c7ac5f2
8 changed files with 159 additions and 45 deletions
|
@ -12,6 +12,7 @@ const dec = @import("dec.zig");
|
|||
|
||||
comptime {
|
||||
exportDecFn(dec.fromStr, "from_str");
|
||||
exportDecFn(dec.toStr, "to_str");
|
||||
exportDecFn(dec.fromF64C, "from_f64");
|
||||
exportDecFn(dec.eqC, "eq");
|
||||
exportDecFn(dec.neqC, "neq");
|
||||
|
@ -153,7 +154,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");
|
||||
|
@ -174,6 +174,7 @@ comptime {
|
|||
}
|
||||
|
||||
inline for (FLOATS) |T| {
|
||||
str.exportFromFloat(T, ROC_BUILTINS ++ "." ++ STR ++ ".from_float.");
|
||||
num.exportParseFloat(T, ROC_BUILTINS ++ "." ++ STR ++ ".to_float.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue