Partager via


Character.CodePointCount Method

Definition

Overloads

CodePointCount(ICharSequence, Int32, Int32)

Returns the number of Unicode code points in the text range of the specified char sequence.

CodePointCount(Char[], Int32, Int32)

Returns the number of Unicode code points in a subarray of the char array argument.

CodePointCount(String, Int32, Int32)

Returns the number of Unicode code points in the text range of the specified char sequence.

CodePointCount(ICharSequence, Int32, Int32)

Returns the number of Unicode code points in the text range of the specified char sequence.

[Android.Runtime.Register("codePointCount", "(Ljava/lang/CharSequence;II)I", "")]
public static int CodePointCount (Java.Lang.ICharSequence seq, int beginIndex, int endIndex);
[<Android.Runtime.Register("codePointCount", "(Ljava/lang/CharSequence;II)I", "")>]
static member CodePointCount : Java.Lang.ICharSequence * int * int -> int

Parameters

seq
ICharSequence

the char sequence

beginIndex
Int32

the index to the first char of the text range.

endIndex
Int32

the index after the last char of the text range.

Returns

the number of Unicode code points in the specified text range

Attributes

Exceptions

if seq is null.

if beginIndex , beginIndex > endIndex or if endIndex is greater than the length of seq.

Remarks

Returns the number of Unicode code points in the text range of the specified char sequence. The text range begins at the specified beginIndex and extends to the char at index endIndex - 1. Thus the length (in chars) of the text range is endIndex-beginIndex. Unpaired surrogates within the text range count as one code point each.

Added in 1.5.

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

CodePointCount(Char[], Int32, Int32)

Returns the number of Unicode code points in a subarray of the char array argument.

[Android.Runtime.Register("codePointCount", "([CII)I", "")]
public static int CodePointCount (char[]? a, int offset, int count);
[<Android.Runtime.Register("codePointCount", "([CII)I", "")>]
static member CodePointCount : char[] * int * int -> int

Parameters

a
Char[]

the char array

offset
Int32

the index of the first char in the given char array

count
Int32

the length of the subarray in chars

Returns

the number of Unicode code points in the specified subarray

Attributes

Exceptions

if seq is null.

if offset , count or if offset + count is greater than the length of seq.

Remarks

Returns the number of Unicode code points in a subarray of the char array argument. The offset argument is the index of the first char of the subarray and the count argument specifies the length of the subarray in chars. Unpaired surrogates within the subarray count as one code point each.

Added in 1.5.

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

CodePointCount(String, Int32, Int32)

Returns the number of Unicode code points in the text range of the specified char sequence.

public static int CodePointCount (string seq, int beginIndex, int endIndex);
static member CodePointCount : string * int * int -> int

Parameters

seq
String

the char sequence

beginIndex
Int32

the index to the first char of the text range.

endIndex
Int32

the index after the last char of the text range.

Returns

the number of Unicode code points in the specified text range

Remarks

Returns the number of Unicode code points in the text range of the specified char sequence. The text range begins at the specified beginIndex and extends to the char at index endIndex - 1. Thus the length (in chars) of the text range is endIndex-beginIndex. Unpaired surrogates within the text range count as one code point each.

Added in 1.5.

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