2024-01-04 15:02:21 +01:00
|
|
|
%import textio
|
2024-01-05 20:46:26 +01:00
|
|
|
%import string
|
2023-12-31 01:02:33 +01:00
|
|
|
%zeropage basicsafe
|
2024-01-04 00:30:20 +01:00
|
|
|
%option no_sysinit
|
2023-12-31 01:02:33 +01:00
|
|
|
|
2023-10-15 22:44:34 +02:00
|
|
|
main {
|
2023-12-30 04:34:07 +01:00
|
|
|
sub start() {
|
2024-01-05 20:46:26 +01:00
|
|
|
str s = "?"
|
|
|
|
s[0] = 's'
|
|
|
|
txt.print(s)
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
if 's' in s {
|
|
|
|
txt.print("ok1\n")
|
|
|
|
} else {
|
|
|
|
txt.print("fail1\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
void string.find(s, 's')
|
|
|
|
if_cs {
|
|
|
|
txt.print("ok2\n")
|
|
|
|
} else {
|
|
|
|
txt.print("fail2\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
if string.contains(s, 's') {
|
|
|
|
txt.print("ok3\n")
|
|
|
|
} else {
|
|
|
|
txt.print("fail3\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
if 'q' in s {
|
|
|
|
txt.print("ok1\n")
|
|
|
|
} else {
|
|
|
|
txt.print("fail1\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
void string.find(s, 'q')
|
|
|
|
if_cs {
|
|
|
|
txt.print("ok2\n")
|
|
|
|
} else {
|
|
|
|
txt.print("fail2\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
if string.contains(s, 'q') {
|
|
|
|
txt.print("ok3\n")
|
|
|
|
} else {
|
|
|
|
txt.print("fail3\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
str buffer="?" * 20
|
|
|
|
str name = "irmen de jong"
|
|
|
|
string.left(name, 5, buffer)
|
|
|
|
txt.print(buffer)
|
|
|
|
txt.nl()
|
|
|
|
string.right(name, 4, buffer)
|
|
|
|
txt.print(buffer)
|
|
|
|
txt.nl()
|
2024-01-04 20:44:46 +01:00
|
|
|
|
2023-12-26 22:01:49 +01:00
|
|
|
}
|
2023-12-19 22:59:01 +01:00
|
|
|
}
|