Files
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

11 lines
534 B
Mojo

# probe: ord of a one-character String (ASCII and not), and chr of a code point
def main():
var s = "aé€😀"
print(ord("A"), ord(String(s[codepoint=0])), ord(String(s[codepoint=1])), ord(String(s[codepoint=2])), ord(String(s[codepoint=3])))
print(chr(65), chr(233), chr(8364), chr(128512), chr(48))
var c = chr(66)
print(c, c.byte_length(), chr(233).byte_length(), chr(128512).count_codepoints())
print(chr(ord("a") + 1) + chr(0x41))
var k = 3
print(chr((ord("Y") - ord("A") + k) % 26 + ord("A")))