[StringObject Function]


Locates a character or String within another String. By default, searches from the end of the String, but can also work backwards from a given index, allowing for the locating of all instances of the character or String.


myString.lastIndexOf(val, from)


myString: a variable of type String

val: the value to search for - char or String

from: the index to work backwards from


The index of val within the String, or -1 if not found.

See also

  • LANGUAGE c_str()

  • LANGUAGE charAt()

  • LANGUAGE compareTo()

  • LANGUAGE concat()

  • LANGUAGE endsWith()

  • LANGUAGE equals()

  • LANGUAGE equalsIgnoreCase()

  • LANGUAGE getBytes()

  • LANGUAGE indexOf()

  • LANGUAGE length()

  • LANGUAGE remove()

  • LANGUAGE replace()

  • LANGUAGE reserve()

  • LANGUAGE setCharAt()

  • LANGUAGE startsWith()

  • LANGUAGE substring()

  • LANGUAGE toCharArray()

  • LANGUAGE toDouble()

  • LANGUAGE toFloat()

  • LANGUAGE toInt()

  • LANGUAGE toLowerCase()

  • LANGUAGE toUpperCase()

  • LANGUAGE trim()