removed newString proc again, reverted some unnecesary changes
This commit is contained in:
parent
0852be2dec
commit
ddea990a70
8 changed files with 16 additions and 38 deletions
|
|
@ -21,9 +21,9 @@ proc toStrMaxPrecision*(f: BiggestFloat, literalPostfix = ""): string =
|
|||
if f > 0.0: result = "INF"
|
||||
else: result = "-INF"
|
||||
else:
|
||||
result = newString(80)
|
||||
let newLen = c_snprintf(result[0].addr, 81, "%#.16e" & literalPostfix, f)
|
||||
result.setLen(newLen)
|
||||
var buf: array[0..80, char]
|
||||
let newLen = c_snprintf(buf.cstring, buf.len.uint, "%#.16e%s", f, literalPostfix.cstring)
|
||||
result = $buf.cstring
|
||||
|
||||
proc encodeStr*(s: string, result: var string) =
|
||||
for i in countup(0, len(s) - 1):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue