summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSatish BD <bdsatish@gmail.com>2013-12-26 00:55:17 +0200
committerSatish BD <bdsatish@gmail.com>2013-12-26 00:55:17 +0200
commit40bd63f83b045ab88c2da232d4848566aa5008ca (patch)
tree63095594be7507a704dc1d7ecbd5321b8e415cff
parent69b816f07c78ab8e672eaa926e9bd3e28c6ff658 (diff)
downloadNim-40bd63f83b045ab88c2da232d4848566aa5008ca.tar.gz
Define $ operator for TRune
-rw-r--r--lib/pure/unicode.nim4
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