RosettaCodeData/Task/String-length/Nim/string-length-1.nim
2016-12-05 23:44:36 +01:00

4 lines
136 B
Nim

var s: string = "Hello, world! ☺"
echo '"',s, '"'," has byte length: ", len(s)
# -> "Hello, world! ☺" has unicode char length: 17