mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 14:55:24 +00:00
don't filter '\0' characters in string generation
This commit is contained in:
@@ -2427,12 +2427,7 @@ proc collectionToString[T](x: T, prefix, separator, suffix: string): string =
|
||||
result.add($value)
|
||||
# prevent temporary string allocation
|
||||
elif compiles(result.add(value)):
|
||||
# don't insert '\0' characters into the result string
|
||||
when value is char:
|
||||
if value != '\0':
|
||||
result.add(value)
|
||||
else:
|
||||
result.add(value)
|
||||
result.add(value)
|
||||
else:
|
||||
result.add($value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user