RosettaCodeData/Task/Substring-Top-and-tail/Nim/substring-top-and-tail.nim
2020-02-17 23:21:07 -08:00

9 lines
193 B
Nim

import unicode
let s = "Hänsel ««: 10,00€"
echo(s.runeSubStr(1))
echo(s.runeSubStr(0, -1))
echo(s.runeSubStr(1, -1))
# using the runes type and slices
let r = s.toRunes
echo(r[1 .. ^2])