Android Guides | Samples

Java.Lang.String.OffsetByCodePoints Method

Returns the index within this object that is offset from index by codePointOffset code points.

Syntax

[Android.Runtime.Register("offsetByCodePoints", "(II)I", "")]
public Int32 OffsetByCodePoints (Int32 index, Int32 codePointOffset)

Parameters

index
the index within this object to calculate the offset from.
codePointOffset
the number of code points to count.

Exceptions

TypeReason
IndexOutOfBoundsExceptionif index is negative or greater than length() or if there aren't enough code points before or after index to match codePointOffset.

Remarks

Returns the index within this object that is offset from index by codePointOffset code points.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1