don't filter '\0' characters in string generation
This commit is contained in:
parent
3bf1f019a7
commit
54808ab12f
3 changed files with 4 additions and 8 deletions
|
|
@ -22,7 +22,7 @@ proc toStrMaxPrecision*(f: BiggestFloat, literalPostfix = ""): string =
|
|||
else: result = "-INF"
|
||||
else:
|
||||
var buf: array[0..80, char]
|
||||
let newLen = c_snprintf(buf.cstring, buf.len.uint, "%#.16e%s", f, literalPostfix.cstring)
|
||||
discard c_snprintf(buf.cstring, buf.len.uint, "%#.16e%s", f, literalPostfix.cstring)
|
||||
result = $buf.cstring
|
||||
|
||||
proc encodeStr*(s: string, result: var string) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue