Sub InStrRev($source As String, $searchStr As String) As Integer

' -or-

Sub LastPos($searchStr As String, $source As String) As Integer


Returns an integer that specifies the start position of the last occurrence of one string within another string.


InStrRev is case-sensitive. The first character in $source has the position 1. If $searchStr is not found, InStrRev returns 0.


Parameters


  • $searchStr ... String expression to search for.
  • $source ... String expression in which the search is performed.


Example:

Dim $s, $i

$s = "a number or a text"
$i = InStrRev("a", $s) 'returns $i = 13