Last active
February 12, 2016 12:26
-
-
Save kazoo04/4c85b99aae2f38cba059 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 std.stdio; | |
import std.array; | |
import std.utf; | |
void main() { | |
string s = "AあBい"; | |
foreach(c; array(s)) { | |
foreach(b; [c].toUTF8) { | |
writef("%02x ", b); | |
} | |
writeln(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment