Bugfix: strutils.delete
This commit is contained in:
parent
c5d8a5c1da
commit
7d6de1cf90
3 changed files with 19 additions and 8 deletions
|
|
@ -10,6 +10,17 @@ proc main() =
|
|||
testStrip()
|
||||
for p in split("/home/a1:xyz:/usr/bin", {':'}):
|
||||
write(stdout, p)
|
||||
|
||||
proc testDelete =
|
||||
var s = "0123456789ABCDEFGH"
|
||||
delete(s, 4, 5)
|
||||
assert s == "01236789ABCDEFGH"
|
||||
delete(s, s.len-1, s.len-1)
|
||||
assert s == "01236789ABCDEFG"
|
||||
delete(s, 0, 0)
|
||||
assert s == "1236789ABCDEFG"
|
||||
|
||||
testDelete()
|
||||
|
||||
assert(insertSep($1000_000) == "1_000_000")
|
||||
assert(insertSep($232) == "232")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue