Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/String-matching/FBSL/string-matching.fbsl
Normal file
15
Task/String-matching/FBSL/string-matching.fbsl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#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
|
||||
Loading…
Add table
Add a link
Reference in a new issue