don't filter '\0' characters in string generation

This commit is contained in:
Arne Döring 2017-08-07 18:21:21 +02:00
commit 54808ab12f
3 changed files with 4 additions and 8 deletions

View file

@ -46,6 +46,7 @@ doAssert dataStr == $data
import strutils
# array test
let arr = ['H','e','l','l','o',' ','W','o','r','l','d','!','\0']
doAssert $arr == "[H, e, l, l, o, , W, o, r, l, d, !, ]"
doAssert $arr == "[H, e, l, l, o, , W, o, r, l, d, !, \0]"
doAssert $arr.cstring == "Hello World!"