String = "fi neht evetS lluf retfa ro og evetS hcum"
SubString$ = "evetS"
You have two different instances of the SubString, so is your goal to count from left to right or right to left?
Well, I would look at it this way...
Pete
SubString$ = "evetS"
You have two different instances of the SubString, so is your goal to count from left to right or right to left?
Well, I would look at it this way...
Code: (Select All)
$CONSOLE:ONLY
DEFLNG A-Z
LINE INPUT "Search term: "; p$
s$ = "much Steve go or after full Steve then if"
PRINT s$
PRINT INSTR(s$, p$)
PRINT _INSTRREV(s$, p$)
PRINT resteve$(s$)
j = insteve(s$, p$)
LOCATE , j: PRINT "^"
COLOR 14: PRINT j: COLOR 7, 0
SLEEP
RUN
FUNCTION insteve (a$, b$)
insteve = INSTR(resteve$(a$), resteve$(b$))
END FUNCTION
FUNCTION resteve$ (a$)
b$ = ""
FOR i = 1 TO LEN(a$)
b$ = b$ + MID$(a$, LEN(a$) - i + 1, 1)
NEXT
resteve$ = b$
END FUNCTION
Pete
Shoot first and shoot people who ask questions, later.