Android Guides | Samples

Java.Lang.Character.CodePointCount Method

Counts the number of Unicode code points in the subsequence of the specified character sequence, as delineated by beginIndex and endIndex.

Syntax

[Android.Runtime.Register("codePointCount", "(Ljava/lang/CharSequence;II)I", "")]
public static Int32 CodePointCount (ICharSequence seq, Int32 beginIndex, Int32 endIndex)

Parameters

seq
the CharSequence to look through.
beginIndex
the inclusive index to begin counting at.
endIndex
the exclusive index to stop counting at.

Exceptions

TypeReason
NullPointerExceptionif seq is null.
IndexOutOfBoundsExceptionif beginIndex , beginIndex > endIndex or if endIndex is greater than the length of seq.

Remarks

Counts the number of Unicode code points in the subsequence of the specified character sequence, as delineated by beginIndex and endIndex. Any surrogate values with missing pair values will be counted as one code point.

[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