mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin,strconv: fix and optimize utf8 and formatting functions (#9874)
This commit is contained in:
@ -110,6 +110,14 @@ fn (d Dec64) get_string_64(neg bool, i_n_digit int, i_pad_digit int) string {
|
||||
x++
|
||||
}
|
||||
|
||||
// no decimal digits needed, end here
|
||||
if i_n_digit == 0 {
|
||||
unsafe {
|
||||
buf[i]=0
|
||||
return tos(byteptr(&buf[0]), i)
|
||||
}
|
||||
}
|
||||
|
||||
if out_len >= 1 {
|
||||
buf[y - x] = `.`
|
||||
x++
|
||||
|
Reference in New Issue
Block a user