Skip to content

Instantly share code, notes, and snippets.

@jrfondren
Created April 24, 2019 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrfondren/a944af2448b8aa36a55e2341906f36c4 to your computer and use it in GitHub Desktop.
Save jrfondren/a944af2448b8aa36a55e2341906f36c4 to your computer and use it in GitHub Desktop.
import unicode
let str = "copyright © 2008"
var i = 0
while i < str.len:
if int(str[i]) > 0x7F:
echo runeAt(str, i)
i.inc runeLenAt(str, i)
else:
echo str[i]
i.inc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment