System Namespace String Class
Reports the index position of the last occurrence of a specified String within the given String.
[ VB ]
<Serializable>
Overloads Public Function LastIndexOf ( _
ByVal value As String _
) As Integer
[ C# ]
[ Serializable ]
public int LastIndexOf (
string value
);
[ C++ ]
[ Serializable ]
public: int LastIndexOf (
String* value
);
[ JScript ]
public Serializable
function LastIndexOf (
value : String
) : int;
- value
- A String to seek.
Value |
Meaning |
A positive index position. |
value was found. |
0 |
value is Empty. |
-1 |
value was not found. |
This method begins searching at the last character position of this instance and precedes backwards towards the beginning until either value is found or the first character position has been examined. The search is case-sensitive.
String Members String.LastIndexOf Overload List Int32 IndexOf IndexOfAny LastIndexOfAny