Strings.InStrRev Method (String, String, Int32, CompareMethod)
Returns the position of the first occurrence of one string within another, starting from the right side of the string.
Assembly: Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)
public static int InStrRev( string StringCheck, string StringMatch, int Start = -1, CompareMethod Compare = CompareMethod.Binary )
Required. String expression being searched.
Required. String expression being searched for.
Optional. Numeric expression setting the one-based starting position for each search, starting from the left side of the string. If Start is omitted then –1 is used, meaning the search begins at the last character position. Search then proceeds from right to left.
Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. If omitted, a binary comparison is performed. See Settings for values.
Return ValueType: System.Int32
StringCheck is zero-length
StringMatch is zero-length
StringMatch is not found
StringMatch is found within StringCheck
Position at which the first match is found, starting with the right side of the string.
Start is greater than length of StringMatch
Note that the syntax for the InStrRev function is not the same as the syntax for the InStr function.
The Compare argument can have the following values.
Performs a binary comparison.
Performs a textual comparison.
Available since 1.1
Available since 2.0