public int codePointCount (int beginIndex, int endIndex)

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 chars) of the text range is endIndex-beginIndex. Unpaired surrogates within the text range count as one code point each.

Parameters:
beginIndex    the index to the first char of the text range.
endIndex    the index after the last char of the text range.

Returns:  the number of Unicode code points in the specified text range

Exceptions:
IndexOutOfBoundsException    if the beginIndex is negative, or endIndex is larger than the length of this String, or beginIndex is larger than endIndex.

Since:  1.5