tomo/test/text.tm

25 lines
482 B
Plaintext
Raw Normal View History

2024-03-03 14:30:31 -08:00
>> str := "Hello Amélie!"
>> str:upper()
= "HELLO AMÉLIE!"
>> str:lower()
= "hello amélie!"
>> str:lower():title()
= "Hello Amélie!"
2024-03-03 14:49:40 -08:00
>> \UE9
2024-03-03 14:49:40 -08:00
= "é"
>> \U65\U301
= "é"
>> \UE9 == \U65\U301
= yes
>> amelie := "Amélie"
>> amelie:clusters()
= ["A", "m", "é", "l", "i", "e"] : [Text]
>> amelie:codepoints()
= [65_i32, 109_i32, 101_i32, 769_i32, 108_i32, 105_i32, 101_i32] : [Int32]
>> amelie:bytes()
= [65_i8, 109_i8, 101_i8, -52_i8, -127_i8, 108_i8, 105_i8, 101_i8] : [Int8]