Returns the number of Unicode code points in the specified text
range of this String
. The text range begins at the
specified beginIndex
and extends to the
char
at index endIndex - 1
. Thus the
length (in char
s) of the text range is
endIndex-beginIndex
. Unpaired surrogates within
the text range count as one code point each.
beginIndex | the index to the first char of
the text range. | |
endIndex | the index after the last char of
the text range. |
IndexOutOfBoundsException | if the
beginIndex is negative, or endIndex
is larger than the length of this String , or
beginIndex is larger than endIndex . |
Diagram: String