Rinstr()

Find a Substring within a String starting from the end. The search is case sensitive.

Syntax: Position = Rinstr(Source,Find)

  • Position: Starting with 1 from left, 0 = not found
  • Source: String to search in
  • Find: String to find

Example:

  dim s as string
  dim pos as byte
  s = "Hello World"
  pos = rinstr(s,"l")    ' output: 3
  pos = rinstr(s,"ld")  ' output: 10