Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,38 @@
|
|||
import system'routines;
|
||||
import extensions;
|
||||
|
||||
extension op : String
|
||||
{
|
||||
string printAsString()
|
||||
{
|
||||
console.print(self," ")
|
||||
}
|
||||
|
||||
string printAsUTF8Array()
|
||||
{
|
||||
self.toByteArray().forEach:(b){ console.print(b.toString(16)," ") }
|
||||
}
|
||||
|
||||
string printAsUTF32()
|
||||
{
|
||||
self.toArray().forEach:(c){ console.print("U+",c.toInt().toString(16)," ") }
|
||||
}
|
||||
}
|
||||
|
||||
public program()
|
||||
{
|
||||
"A".printAsString().printAsUTF8Array().printAsUTF32();
|
||||
console.printLine();
|
||||
|
||||
"ö".printAsString().printAsUTF8Array().printAsUTF32();
|
||||
console.printLine();
|
||||
|
||||
"Ж".printAsString().printAsUTF8Array().printAsUTF32();
|
||||
console.printLine();
|
||||
|
||||
"€".printAsString().printAsUTF8Array().printAsUTF32();
|
||||
console.printLine();
|
||||
|
||||
"𝄞".printAsString().printAsUTF8Array().printAsUTF32();
|
||||
console.printLine();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue