aboutsummaryrefslogtreecommitdiff
path: root/core/strings
diff options
context:
space:
mode:
Diffstat (limited to 'core/strings')
-rw-r--r--core/strings/builder.odin12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/strings/builder.odin b/core/strings/builder.odin
index 05382f04e..b1180d5e9 100644
--- a/core/strings/builder.odin
+++ b/core/strings/builder.odin
@@ -675,7 +675,7 @@ Returns:
*/
write_float :: proc(b: ^Builder, f: f64, fmt: byte, prec, bit_size: int, always_signed := false) -> (n: int) {
buf: [384]byte
- s := strconv.append_float(buf[:], f, fmt, prec, bit_size)
+ s := strconv.write_float(buf[:], f, fmt, prec, bit_size)
// If the result starts with a `+` then unless we always want signed results,
// we skip it unless it's followed by an `I` (because of +Inf).
if !always_signed && (buf[0] == '+' && buf[1] != 'I') {
@@ -699,7 +699,7 @@ Returns:
*/
write_f16 :: proc(b: ^Builder, f: f16, fmt: byte, always_signed := false) -> (n: int) {
buf: [384]byte
- s := strconv.append_float(buf[:], f64(f), fmt, 2*size_of(f), 8*size_of(f))
+ s := strconv.write_float(buf[:], f64(f), fmt, 2*size_of(f), 8*size_of(f))
if !always_signed && (buf[0] == '+' && buf[1] != 'I') {
s = s[1:]
}
@@ -739,7 +739,7 @@ Output:
*/
write_f32 :: proc(b: ^Builder, f: f32, fmt: byte, always_signed := false) -> (n: int) {
buf: [384]byte
- s := strconv.append_float(buf[:], f64(f), fmt, 2*size_of(f), 8*size_of(f))
+ s := strconv.write_float(buf[:], f64(f), fmt, 2*size_of(f), 8*size_of(f))
if !always_signed && (buf[0] == '+' && buf[1] != 'I') {
s = s[1:]
}
@@ -761,7 +761,7 @@ Returns:
*/
write_f64 :: proc(b: ^Builder, f: f64, fmt: byte, always_signed := false) -> (n: int) {
buf: [384]byte
- s := strconv.append_float(buf[:], f64(f), fmt, 2*size_of(f), 8*size_of(f))
+ s := strconv.write_float(buf[:], f64(f), fmt, 2*size_of(f), 8*size_of(f))
if !always_signed && (buf[0] == '+' && buf[1] != 'I') {
s = s[1:]
}
@@ -782,7 +782,7 @@ Returns:
*/
write_u64 :: proc(b: ^Builder, i: u64, base: int = 10) -> (n: int) {
buf: [32]byte
- s := strconv.append_bits(buf[:], i, base, false, 64, strconv.digits, nil)
+ s := strconv.write_bits(buf[:], i, base, false, 64, strconv.digits, nil)
return write_string(b, s)
}
/*
@@ -800,7 +800,7 @@ Returns:
*/
write_i64 :: proc(b: ^Builder, i: i64, base: int = 10) -> (n: int) {
buf: [32]byte
- s := strconv.append_bits(buf[:], u64(i), base, true, 64, strconv.digits, nil)
+ s := strconv.write_bits(buf[:], u64(i), base, true, 64, strconv.digits, nil)
return write_string(b, s)
}
/*