12 lines
189 B
Text
12 lines
189 B
Text
|
|
txt := "Hello world!"
|
|
|
|
# string length
|
|
assertEq(txt.length(), 12)
|
|
|
|
# string split
|
|
assertEq(txt.split(" ").length(), 2)
|
|
|
|
# string indexing
|
|
assertEq(txt.at(1), "e")
|
|
assertEq(txt.at(6), "w")
|