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

5 lines
136 B
Nim
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
var s: string = "Hello, world! ☺"
echo '"',s, '"'," has byte length: ", len(s)
# -> "Hello, world! ☺" has unicode char length: 17