aboutsummaryrefslogtreecommitdiff
path: root/core/strconv/deprecated.odin
blob: c644d331e4f2337c6a3be4a9c230786de18e2544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package strconv

// (2025-06-05) These procedures are to be removed at a later release.

@(deprecated="Use write_bits instead")
append_bits :: proc(buf: []byte, x: u64, base: int, is_signed: bool, bit_size: int, digits: string, flags: Int_Flags) -> string {
	return write_bits(buf, x, base, is_signed, bit_size, digits, flags)
}

@(deprecated="Use write_bits_128 instead")
append_bits_128 :: proc(buf: []byte, x: u128, base: int, is_signed: bool, bit_size: int, digits: string, flags: Int_Flags) -> string {
	return write_bits_128(buf, x, base, is_signed, bit_size, digits, flags)
}

@(deprecated="Use write_bool instead")
append_bool :: proc(buf: []byte, b: bool) -> string {
	return write_bool(buf, b)
}

@(deprecated="Use write_uint instead")
append_uint :: proc(buf: []byte, u: u64, base: int) -> string {
	return write_uint(buf, u, base)
}

@(deprecated="Use write_int instead")
append_int :: proc(buf: []byte, i: i64, base: int) -> string {
	return write_int(buf, i, base)
}

@(deprecated="Use write_u128 instead")
append_u128 :: proc(buf: []byte, u: u128, base: int) -> string {
	return write_u128(buf, u, base)
}

@(deprecated="Use write_float instead")
append_float :: proc(buf: []byte, f: f64, fmt: byte, prec, bit_size: int) -> string {
	return write_float(buf, f, fmt, prec, bit_size)
}

// 2025-10-03 Deprecated C short names and implementations

@(deprecated="Use strconv.write_int() instead")
itoa :: proc(buf: []byte, i: int) -> string {
	return write_int(buf, i64(i), 10)
}

@(deprecated="Use strconv.parse_int() instead")
atoi :: proc(s: string) -> int {
	v, _ := parse_int(s)
	return v
}

@(deprecated="Use strconv.parse_f64() instead")
atof :: proc(s: string) -> f64 {
	v, _  := parse_f64(s)
	return v
}

@(deprecated="Use strconv.write_float() instead")
ftoa :: proc(buf: []byte, f: f64, fmt: byte, prec, bit_size: int) -> string {
	return string(generic_ftoa(buf, f, fmt, prec, bit_size))
}