Character.CodePointBefore Method

Definition

Overloads

CodePointBefore(Char[], Int32, Int32)

Returns the code point preceding the given index of the char array, where only array elements with index greater than or equal to start can be used.

CodePointBefore(String, Int32)

Returns the code point preceding the given index of the CharSequence.

CodePointBefore(ICharSequence, Int32)

Returns the code point preceding the given index of the CharSequence.

CodePointBefore(Char[], Int32)

Returns the code point preceding the given index of the char array.

CodePointBefore(Char[], Int32, Int32)

Returns the code point preceding the given index of the char array, where only array elements with index greater than or equal to start can be used.

[Android.Runtime.Register("codePointBefore", "([CII)I", "")]
public static int CodePointBefore (char[]? a, int index, int start);
[<Android.Runtime.Register("codePointBefore", "([CII)I", "")>]
static member CodePointBefore : char[] * int * int -> int

Parameters

a
Char[]

the char array

index
Int32

the index following the code point that should be returned

start
Int32

the index of the first array element in the char array

Returns

the Unicode code point value before the given index.

Attributes

Exceptions

if seq is null.

if the index <= start, start , index is greater than the length of seq, or if start is equal or greater than the length of seq.

Remarks

Returns the code point preceding the given index of the char array, where only array elements with index greater than or equal to start can be used. If the char value at (index - 1) in the char array is in the low-surrogate range, (index - 2) is not less than start, and the char value at (index - 2) in the char array is in the high-surrogate range, then the supplementary code point corresponding to this surrogate pair is returned. Otherwise, the char value at (index - 1) is returned.

Added in 1.5.

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

CodePointBefore(String, Int32)

Returns the code point preceding the given index of the CharSequence.

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

Parameters

seq
String

the CharSequence instance

index
Int32

the index following the code point that should be returned

Returns

the Unicode code point value before the given index.

Remarks

Returns the code point preceding the given index of the CharSequence. If the char value at (index - 1) in the CharSequence is in the low-surrogate range, (index - 2) is not negative, and the char value at (index - 2) in the CharSequence is in the high-surrogate range, then the supplementary code point corresponding to this surrogate pair is returned. Otherwise, the char value at (index - 1) is returned.

Added in 1.5.

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

CodePointBefore(ICharSequence, Int32)

Returns the code point preceding the given index of the CharSequence.

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

Parameters

seq
ICharSequence

the CharSequence instance

index
Int32

the index following the code point that should be returned

Returns

the Unicode code point value before the given index.

Attributes

Exceptions

if seq is null.

if the index is less than 1 or greater than the length of seq.

Remarks

Returns the code point preceding the given index of the CharSequence. If the char value at (index - 1) in the CharSequence is in the low-surrogate range, (index - 2) is not negative, and the char value at (index - 2) in the CharSequence is in the high-surrogate range, then the supplementary code point corresponding to this surrogate pair is returned. Otherwise, the char value at (index - 1) is returned.

Added in 1.5.

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

CodePointBefore(Char[], Int32)

Returns the code point preceding the given index of the char array.

[Android.Runtime.Register("codePointBefore", "([CI)I", "")]
public static int CodePointBefore (char[]? a, int index);
[<Android.Runtime.Register("codePointBefore", "([CI)I", "")>]
static member CodePointBefore : char[] * int -> int

Parameters

a
Char[]

the char array

index
Int32

the index following the code point that should be returned

Returns

the Unicode code point value before the given index.

Attributes

Exceptions

if seq is null.

if the index is less than 1 or greater than the length of seq.

Remarks

Returns the code point preceding the given index of the char array. If the char value at (index - 1) in the char array is in the low-surrogate range, (index - 2) is not negative, and the char value at (index - 2) in the char array is in the high-surrogate range, then the supplementary code point corresponding to this surrogate pair is returned. Otherwise, the char value at (index - 1) is returned.

Added in 1.5.

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