diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-11-05 21:00:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 14:00:49 +0100 |
commit | 8e1fa84b0d44bc6fb995992becf659d62b36713a (patch) | |
tree | df2d3cbb21d0103dff231197bc9d4ee8e18420ea /lib | |
parent | a8af664e8ba8672e736c72971a18c0e00ba9b086 (diff) | |
download | Nim-8e1fa84b0d44bc6fb995992becf659d62b36713a.tar.gz |
fix #15663 (#15839) [backport:1.4]
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/widestrs.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/system/widestrs.nim b/lib/system/widestrs.nim index 6d54bce9b..955fab46a 100644 --- a/lib/system/widestrs.nim +++ b/lib/system/widestrs.nim @@ -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) |