If I understand what you need, to convert a "string" to "WideCString", you can
do the following:
# Convert a "string" to "WideCString".
proc toWideCString(str: string): WideCString =
var
i : int = 0
ret : WideCString
new(ret)
while i < str.len():
ret[i] = Utf16Char(str[i])
i = i + 1
return ret
# Example:
var str : WideCString
str = toWideCString("Nim language")
echo str
- How to open new console window and File, FileInfo, FileHandl... mmierzwa
- Re: How to open new console window and File, FileInfo, ... Libman
- Re: How to open new console window and File, FileIn... AironGregatti
