Skip to content

Instantly share code, notes, and snippets.

@kazoo04
Last active February 12, 2016 12:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazoo04/4c85b99aae2f38cba059 to your computer and use it in GitHub Desktop.
Save kazoo04/4c85b99aae2f38cba059 to your computer and use it in GitHub Desktop.
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