/proc/findtext(Haystack, Needle, Start, End)
Arguments:
Haystack: The string to search through.
Needle: The text to search for, or the /regex to search with.
Start = 1: The byte position in the string to start searching at.
End = 0: The byte position immediately after the last character that should be searched.
Returns:
num: The position in the string of the first match; 0 if no match was found.

If the Needle provided is a string, the comparison occurs case insensitively. For the case sensitive version, see findtextex.md.

if(findtext("Foo Bar", "foo"))
    world.log << "This succeeds!"

if(findtext("Foo Bar", "Foo", 3))
    world.log << "This does not!" // as the Start is set after the occurence in the string

Negative amounts for the Start or End value count from the end of the string.

if(findtext("Foo Bar", "Bar", -3))
    world.log << "We get here!"

See also: