prevent null characters in $ on collections of char
This commit is contained in:
parent
a6e6b05565
commit
11914a23be
2 changed files with 9 additions and 4 deletions
|
|
@ -47,7 +47,5 @@ doAssert dataStr == $data
|
|||
import strutils
|
||||
# array test
|
||||
let arr = ['H','e','l','l','o',' ','W','o','r','l','d','!','\0']
|
||||
|
||||
# not sure if this is really a good idea
|
||||
doAssert startsWith($arr, "[H, e, l, l, o, , W, o, r, l, d, !,")
|
||||
doAssert $arr == "[H, e, l, l, o, , W, o, r, l, d, !, ]"
|
||||
doAssert $arr.cstring == "Hello World!"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue