Merge pull request #779 from brihat/master

Define $ operator for TRune
This commit is contained in:
Andreas Rumpf
2014-01-13 14:34:24 -08:00

View File

@@ -132,6 +132,10 @@ proc toUTF8*(c: TRune): string {.rtl, extern: "nuc$1".} =
result = newString(1)
result[0] = chr(i)
proc `$`*(rune: TRune): string =
## converts a rune to a string
rune.toUTF8
proc `$`*(runes: seq[TRune]): string =
## converts a sequence of runes to a string
result = ""