TextUtils.LastIndexOf Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| LastIndexOf(String, Char, Int32, Int32) |
Searches backward for a character within an inclusive index range. |
| LastIndexOf(ICharSequence, Char, Int32, Int32) |
Searches backward for a character within an inclusive index range. |
| LastIndexOf(String, Char, Int32) |
Finds the last occurrence of a character at or before an index. |
| LastIndexOf(String, Char) |
Finds the last occurrence of a character. |
| LastIndexOf(ICharSequence, Char) |
Finds the last occurrence of a character. |
| LastIndexOf(ICharSequence, Char, Int32) |
Finds the last occurrence of a character at or before an index. |
LastIndexOf(String, Char, Int32, Int32)
Searches backward for a character within an inclusive index range.
public static int LastIndexOf(string? s, char ch, int start, int last);
static member LastIndexOf : string * char * int * int -> int
Parameters
- s
- String
The text to search.
- ch
- Char
The character to find.
- start
- Int32
The smallest character index to include in the search.
- last
- Int32
The greatest character index to include in the search.
Returns
The last matching index in the range, or -1 if the range has no match.
Remarks
Android reference for android.text.TextUtils.lastIndexOf.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LastIndexOf(ICharSequence, Char, Int32, Int32)
Searches backward for a character within an inclusive index range.
[Android.Runtime.Register("lastIndexOf", "(Ljava/lang/CharSequence;CII)I", "")]
public static int LastIndexOf(Java.Lang.ICharSequence? s, char ch, int start, int last);
[<Android.Runtime.Register("lastIndexOf", "(Ljava/lang/CharSequence;CII)I", "")>]
static member LastIndexOf : Java.Lang.ICharSequence * char * int * int -> int
Parameters
The text to search.
- ch
- Char
The character to find.
- start
- Int32
The smallest character index to include in the search.
- last
- Int32
The greatest character index to include in the search.
Returns
The last matching index in the range, or -1 if the range has no match.
- Attributes
Remarks
Android reference for android.text.TextUtils.lastIndexOf.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LastIndexOf(String, Char, Int32)
Finds the last occurrence of a character at or before an index.
public static int LastIndexOf(string? s, char ch, int last);
static member LastIndexOf : string * char * int -> int
Parameters
- s
- String
The text to search.
- ch
- Char
The character to find.
- last
- Int32
The greatest character index to include in the search.
Returns
The last matching index not greater than last, or -1 if no match exists.
Remarks
Android reference for android.text.TextUtils.lastIndexOf.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LastIndexOf(String, Char)
Finds the last occurrence of a character.
public static int LastIndexOf(string? s, char ch);
static member LastIndexOf : string * char -> int
Parameters
- s
- String
The text to search.
- ch
- Char
The character to find.
Returns
The last matching character index, or -1 if the character is absent.
Remarks
Android reference for android.text.TextUtils.lastIndexOf.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LastIndexOf(ICharSequence, Char)
Finds the last occurrence of a character.
[Android.Runtime.Register("lastIndexOf", "(Ljava/lang/CharSequence;C)I", "")]
public static int LastIndexOf(Java.Lang.ICharSequence? s, char ch);
[<Android.Runtime.Register("lastIndexOf", "(Ljava/lang/CharSequence;C)I", "")>]
static member LastIndexOf : Java.Lang.ICharSequence * char -> int
Parameters
The text to search.
- ch
- Char
The character to find.
Returns
The last matching character index, or -1 if the character is absent.
- Attributes
Remarks
Android reference for android.text.TextUtils.lastIndexOf.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LastIndexOf(ICharSequence, Char, Int32)
Finds the last occurrence of a character at or before an index.
[Android.Runtime.Register("lastIndexOf", "(Ljava/lang/CharSequence;CI)I", "")]
public static int LastIndexOf(Java.Lang.ICharSequence? s, char ch, int last);
[<Android.Runtime.Register("lastIndexOf", "(Ljava/lang/CharSequence;CI)I", "")>]
static member LastIndexOf : Java.Lang.ICharSequence * char * int -> int
Parameters
The text to search.
- ch
- Char
The character to find.
- last
- Int32
The greatest character index to include in the search.
Returns
The last matching index not greater than last, or -1 if no match exists.
- Attributes
Remarks
Android reference for android.text.TextUtils.lastIndexOf.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.