mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* fixes newStringUninitialized; implement `newStringUninitialized` * add a simple test case * adds a changelog * Update lib/system.nim * Apply suggestions from code review rename to newStringUninit
12 lines
177 B
Nim
12 lines
177 B
Nim
discard """
|
|
matrix: "--mm:refc;"
|
|
"""
|
|
|
|
# bug #22555
|
|
var x = newStringUninit(10)
|
|
doAssert x.len == 10
|
|
for i in 0..<x.len:
|
|
x[i] = chr(ord('a') + i)
|
|
|
|
doAssert x == "abcdefghij"
|