mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
@@ -214,3 +214,10 @@ proc `$`*(w: WideCString, estimate: int, replacement: int = 0xFFFD): string =
|
||||
|
||||
proc `$`*(s: WideCString): string =
|
||||
result = s $ 80
|
||||
|
||||
when defined(nimv2):
|
||||
proc `$`*(s: WideCStringObj, estimate: int, replacement: int = 0xFFFD): string =
|
||||
`$`(s.data, estimate, replacement)
|
||||
|
||||
proc `$`*(s: WideCStringObj): string =
|
||||
$(s.data)
|
||||
|
||||
7
tests/stdlib/t15663.nim
Normal file
7
tests/stdlib/t15663.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
discard """
|
||||
cmd: "nim c --gc:arc $file"
|
||||
output: "Test"
|
||||
"""
|
||||
|
||||
let ws = newWideCString("Test")
|
||||
echo ws
|
||||
Reference in New Issue
Block a user