Language

StringBuffer.LastIndexOf Method

Definition

Overloads

Name Description
LastIndexOf(String)

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

LastIndexOf(String, Int32)

Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index.

LastIndexOf(String)

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

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

Parameters

str
String

The string used by this operation.

Returns

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

Attributes

Exceptions

if string is null.

Remarks

Added in 1.4.

Java documentation for java.lang.StringBuffer.lastIndexOf(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

LastIndexOf(String, Int32)

Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index.

[Android.Runtime.Register("lastIndexOf", "(Ljava/lang/String;I)I", "")]
public override int LastIndexOf(string str, int fromIndex);
[<Android.Runtime.Register("lastIndexOf", "(Ljava/lang/String;I)I", "")>]
override this.LastIndexOf : 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 last occurrence of the string, or -1 when it is not present.

Attributes

Remarks

Added in 1.4.

Java documentation for java.lang.StringBuffer.lastIndexOf(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