Java Reference
In-Depth Information
Returns the code point defined at the given index in
seq
, tak-
ing into account that it may be a supplementary character
represented by the pair
seq[index]
and
seq[index+1]
. There is a
variant that takes an additional
limit
argument that restricts
the use of
index+1
to be less than a specified value.
public static int
codePointAt(CharSequence seq, int index)
Returns the code point defined at the given index in
seq
, tak-
ing into account that it may be a supplementary character
represented
by
the
pair
and
seq.charAt(index)
seq.charAt(index+1)
.
public static int
codePointBefore(char[] seq, int index)
Returns the code point defined preceding the given index in
seq
, taking into account that it may be a supplementary char-
acter represented by the pair
seq[index-2]
and
seq[index-1]
.
There is a variant that takes an additional
start
argument,
that restricts the use of
index-1
and
index-2
to be greater than
or equal to the specified start position.
public static int
codePointBefore(CharSequence seq, int index)
Returns the code point defined at the given index in
seq
, tak-
ing into account that it may be a supplementary character
represented
by
the
pair
and
seq.charAt(index-2)
seq.charAt(index-1)
.
public static int
codePointCount(char[] seq, int start, int count)
Returns the number of code points defined in
seq[start]
to
seq[start+length]
, taking into account surrogate pairs. Any
unpaired surrogate values count as one code point each.