Define $ operator for TRune
This commit is contained in:
parent
69b816f07c
commit
40bd63f83b
1 changed files with 3 additions and 1 deletions
|
|
@ -132,7 +132,9 @@ proc toUTF8*(c: TRune): string {.rtl, extern: "nuc$1".} =
|
||||||
result = newString(1)
|
result = newString(1)
|
||||||
result[0] = chr(i)
|
result[0] = chr(i)
|
||||||
|
|
||||||
proc `$`*(rune: TRune): string = rune.toUTF8
|
proc `$`*(rune: TRune): string =
|
||||||
|
## converts a rune to a string
|
||||||
|
rune.toUTF8
|
||||||
|
|
||||||
proc `$`*(runes: seq[TRune]): string =
|
proc `$`*(runes: seq[TRune]): string =
|
||||||
## converts a sequence of runes to a string
|
## converts a sequence of runes to a string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue