* fix #11352 strutil.insertSep handle negtive number * test for #11352 * optimize * not parts string var * Update lib/pure/strutils.nim Thanks! Co-authored-by: alaviss <leorize+oss@disroot.org> * need to be countdown Co-authored-by: alaviss <leorize+oss@disroot.org>
This commit is contained in:
parent
39487f9728
commit
e2b1491905
2 changed files with 30 additions and 6 deletions
13
tests/modules/tstrutils_insert_sep.nim
Normal file
13
tests/modules/tstrutils_insert_sep.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: '''
|
||||
-100
|
||||
-100,000
|
||||
100,000
|
||||
'''
|
||||
"""
|
||||
# test https://github.com/nim-lang/Nim/issues/11352
|
||||
|
||||
import strutils
|
||||
echo insertSep($(-100), ',')
|
||||
echo insertSep($(-100_000), ',')
|
||||
echo insertSep($(100_000), ',')
|
||||
Loading…
Add table
Add a link
Reference in a new issue