INSTR
pos = INSTR ([start,] s1, s2)
Returns the position pos
of the first occurrence of the
string s2
in string s1
(starting from the
position start
). If there is no match, INSTR returns 0.
Example 1: Get position starting a the beginning of the string
"abcdef"
s1 = "cd"
s2 = print instr(s1, s2) ' Output 3
Example 2: Get position using a starting point
"abcdefabcd"
s1 = "ab"
s2 = print instr(3, s1, s2) ' Output: 7 (instead of 1)
Code samples using INSTR
biorythms.bas
BlackJack.bas
blackjack.bas
bolmo.bas
bulls and cows.bas
calc.bas
dia de una fecha.bas
dmsareareadmd.bas
dogstar5.bas
filemanager.bas
g2 Life.bas
g3 Life.bas
g4 Life.bas
g5 Life.bas
g6 Life.bas
hangman v2.bas
hangman.bas
irc-bot.bas
lander.bas
lib-gputmcon.bas
Mandala life.bas
mandala life.bas
mandelbrot explorer.bas
mastermind.bas
memory match game.bas
memorytest.bas
memoryTest.bas
new bas.bas
new help.bas