RosettaCodeData/Task/String-length/Nim/string-length-1.nim

5 lines
136 B
Nim

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