16 lines
492 B
Plaintext
16 lines
492 B
Plaintext
#APPTYPE CONSOLE
|
|
|
|
DIM s = "roko, mat jane do"
|
|
|
|
IF LEFT(s, 4) = "roko" THEN PRINT STRENC(s), " starts with ", STRENC("roko")
|
|
IF INSTR(s, "mat") THEN PRINT STRENC(s), " contains ", STRENC("mat"), " at ", INSTR
|
|
IF RIGHT(s, 2) = "do" THEN PRINT STRENC(s), " ends with ", STRENC("do")
|
|
PRINT STRENC(s), " contains ", STRENC("o"), " at the following locations:", InstrEx(s, "o")
|
|
|
|
PAUSE
|
|
|
|
SUB InstrEx(mane, match)
|
|
INSTR = 0
|
|
WHILE INSTR(mane, match, INSTR + 1): PRINT " ", INSTR;: WEND
|
|
END SUB
|