mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 23:11:36 +00:00
add widestrs.newWideCString overload (#16860)
This commit is contained in:
@@ -142,6 +142,9 @@ iterator runes(s: cstring, L: int): int =
|
||||
fastRuneAt(s, i, L, result, true)
|
||||
yield result
|
||||
|
||||
proc newWideCString*(size: int): WideCStringObj =
|
||||
createWide(result, size * 2 + 2)
|
||||
|
||||
proc newWideCString*(source: cstring, L: int): WideCStringObj =
|
||||
createWide(result, L * 2 + 2)
|
||||
var d = 0
|
||||
|
||||
Reference in New Issue
Block a user