Created
April 24, 2019 17:36
-
-
Save jrfondren/a944af2448b8aa36a55e2341906f36c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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