diff options
author | Satish BD <bdsatish@gmail.com> | 2013-12-26 00:55:17 +0200 |
---|---|---|
committer | Satish BD <bdsatish@gmail.com> | 2013-12-26 00:55:17 +0200 |
commit | 40bd63f83b045ab88c2da232d4848566aa5008ca (patch) | |
tree | 63095594be7507a704dc1d7ecbd5321b8e415cff /lib/pure | |
parent | 69b816f07c78ab8e672eaa926e9bd3e28c6ff658 (diff) | |
download | Nim-40bd63f83b045ab88c2da232d4848566aa5008ca.tar.gz |
Define $ operator for TRune
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/unicode.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/unicode.nim b/lib/pure/unicode.nim index 0d5b06c92..f90fc2745 100644 --- a/lib/pure/unicode.nim +++ b/lib/pure/unicode.nim @@ -132,7 +132,9 @@ proc toUTF8*(c: TRune): string {.rtl, extern: "nuc$1".} = result = newString(1) 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 = ## converts a sequence of runes to a string |