Liberty BASIC Help Online

INSTR(string1, string2, starting)
This function returns the position of string2 within string1.  If string2 occurs more than once in string1, then only the position of the leftmost occurance will be returned.  If the starting parameter is included, then the search for string2 will begin at the position specified by starting.
  print instr("hello there", "lo")
  produces:    4
  print instr("greetings and meetings", "eetin")
  produces:    3
  print instr("greetings and meetings", "eetin", 5)
  produces:    16
If string2 is not found in string1, or if string2 is not found after starting, then INSTR( ) will return 0.
  print instr("hello", "el", 3)
  produces:    0
and so does:
  print instr("hello", "bye")

Copyright (C) 2003 Shoptalk Systems
Liberty BASIC -