String.IndexOf String.IndexOf Method

Definition

Overloads

IndexOf(String, Int32) IndexOf(String, Int32)

Returns the next index of the given string in this string, or -1.

IndexOf(Int32, Int32) IndexOf(Int32, Int32)

Returns the next index of the given code point, or -1.

IndexOf(Int32) IndexOf(Int32)

Returns the first index of the given code point, or -1.

IndexOf(String) IndexOf(String)

Returns the first index of the given string, or -1.

IndexOf(String, Int32) IndexOf(String, Int32)

Returns the next index of the given string in this string, or -1.

[Android.Runtime.Register("indexOf", "(Ljava/lang/String;I)I", "")]
public int IndexOf (string str, int fromIndex);
member this.IndexOf : string * int -> int

Parameters

fromIndex
Int32 Int32

Returns

Exceptions

Remarks

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.

IndexOf(Int32, Int32) IndexOf(Int32, Int32)

Returns the next index of the given code point, or -1.

[Android.Runtime.Register("indexOf", "(II)I", "")]
public int IndexOf (int ch, int fromIndex);
member this.IndexOf : int * int -> int

Parameters

fromIndex
Int32 Int32

Returns

Remarks

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.

IndexOf(Int32) IndexOf(Int32)

Returns the first index of the given code point, or -1.

[Android.Runtime.Register("indexOf", "(I)I", "")]
public int IndexOf (int ch);
member this.IndexOf : int -> int

Parameters

Returns

Remarks

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.

IndexOf(String) IndexOf(String)

Returns the first index of the given string, or -1.

[Android.Runtime.Register("indexOf", "(Ljava/lang/String;)I", "")]
public int IndexOf (string str);
member this.IndexOf : string -> int

Parameters

Returns

Exceptions

Remarks

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