19 lines
356 B
Hare
19 lines
356 B
Hare
|
use fmt;
|
||
|
use os;
|
||
|
use strings;
|
||
|
use unicode;
|
||
|
|
||
|
export fn main() void = {
|
||
|
const in = os::args[1];
|
||
|
const iter = strings::iter(in);
|
||
|
for (true) {
|
||
|
const rn = match (strings::next(&iter)) {
|
||
|
case let rn: rune =>
|
||
|
yield rn;
|
||
|
case => break;
|
||
|
};
|
||
|
const gc = unicode::rune_gc(rn);
|
||
|
fmt::printfln("'{}'/{:x}: {}", rn, rn: u32, unicode::gc_code(gc))!;
|
||
|
};
|
||
|
};
|