Language

StringBuffer.IndexOf Method

Definition

Overloads

Name Description
IndexOf(String)

Returns the index within this string of the first occurrence of the specified substring.

IndexOf(String, Int32)

Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.

IndexOf(String)

Returns the index within this string of the first occurrence of the specified substring.

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

Parameters

str
String

The string used by this operation.

Returns

The index of the first occurrence of the string, or -1 when it is not present.

Attributes

Remarks

Added in 1.4.

Java documentation for java.lang.StringBuffer.indexOf(java.lang.String).

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.

See also

Applies to

IndexOf(String, Int32)

Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.

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

Parameters

str
String

The string used by this operation.

fromIndex
Int32

The index from which the search or operation begins.

Returns

The index of the first occurrence of the string, or -1 when it is not present.

Attributes

Remarks

Added in 1.4.

Java documentation for java.lang.StringBuffer.indexOf(java.lang.String, int).

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