Files
ziran/tests/spec/std_string.zi
T

13 lines
359 B
Ziran

#import "string_range"
#program_export
main :: () -> s32 {
source: string = "A\u00e9B"
if Substring(source, 0, 1) != "A" { return 1 }
if Substring(source, 1, 2) != "\u00e9" { return 2 }
if Substring(source, 3, 1) != "B" { return 3 }
if Substring(source, 4, 0) != "" { return 4 }
if source[1:3] != "\u00e9" { return 5 }
return 0
}