$intIndex = ReverseFind ( <Target string>,<Search string> )
Finds a character
inside a larger string starting the search from the end.
Parameters
<Target string> This main string is examined for the existence of a character.
<Search string> The character to be searched.
Return Value
Returns the zero based index of the last character in the "Target string" that matches the requested character, -1 if the character is not found.
Remarks
- Rindex()
function is similar to ReverseFind() and has the same syntax.
Example
$Var = "abdcf"
$index = ReverseFind($Var,"f")
- will return the index 4, starting the search from the end.