Character.OffsetByCodePoints Method

Definition

Overloads

OffsetByCodePoints(ICharSequence, Int32, Int32)

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.

OffsetByCodePoints(String, Int32, Int32)

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.

OffsetByCodePoints(Char[], Int32, Int32, Int32, Int32)

Returns the index within the given char subarray that is offset from the given index by codePointOffset code points.

OffsetByCodePoints(ICharSequence, Int32, Int32)

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.

[Android.Runtime.Register("offsetByCodePoints", "(Ljava/lang/CharSequence;II)I", "")]
public static int OffsetByCodePoints (Java.Lang.ICharSequence seq, int index, int codePointOffset);
[<Android.Runtime.Register("offsetByCodePoints", "(Ljava/lang/CharSequence;II)I", "")>]
static member OffsetByCodePoints : Java.Lang.ICharSequence * int * int -> int

Parameters

seq
ICharSequence

the char sequence

index
Int32

the index to be offset

codePointOffset
Int32

the offset in code points

Returns

the index within the char sequence

Attributes

Exceptions

if seq is null.

if index , index is greater than the length of seq, or if there are not enough values in seq to skip codePointOffset code points forwards or backwards (if codePointOffset is negative) from index.

Remarks

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points. Unpaired surrogates within the text range given by index and codePointOffset count as one code point each.

Added in 1.5.

Java documentation for java.lang.Character.offsetByCodePoints(java.lang.CharSequence, int, 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

OffsetByCodePoints(String, Int32, Int32)

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.

public static int OffsetByCodePoints (string seq, int index, int codePointOffset);
static member OffsetByCodePoints : string * int * int -> int

Parameters

seq
String

the char sequence

index
Int32

the index to be offset

codePointOffset
Int32

the offset in code points

Returns

the index within the char sequence

Remarks

Returns the index within the given char sequence that is offset from the given index by codePointOffset code points. Unpaired surrogates within the text range given by index and codePointOffset count as one code point each.

Added in 1.5.

Java documentation for java.lang.Character.offsetByCodePoints(java.lang.CharSequence, int, 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

OffsetByCodePoints(Char[], Int32, Int32, Int32, Int32)

Returns the index within the given char subarray that is offset from the given index by codePointOffset code points.

[Android.Runtime.Register("offsetByCodePoints", "([CIIII)I", "")]
public static int OffsetByCodePoints (char[]? a, int start, int count, int index, int codePointOffset);
[<Android.Runtime.Register("offsetByCodePoints", "([CIIII)I", "")>]
static member OffsetByCodePoints : char[] * int * int * int * int -> int

Parameters

a
Char[]

the char array

start
Int32

the index of the first char of the subarray

count
Int32

the length of the subarray in chars

index
Int32

the index to be offset

codePointOffset
Int32

the offset in code points

Returns

the index within the subarray

Attributes

Exceptions

if seq is null.

if start , count , index , index > start + count, start + count is greater than the length of seq, or if there are not enough values in seq to skip codePointOffset code points forward or backward (if codePointOffset is negative) from index.

Remarks

Returns the index within the given char subarray that is offset from the given index by codePointOffset code points. The start and count arguments specify a subarray of the char array. Unpaired surrogates within the text range given by index and codePointOffset count as one code point each.

Added in 1.5.

Java documentation for java.lang.Character.offsetByCodePoints(char[], int, int, int, 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