HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
String Methods : Return the number of Unicode values found in a string
The codePointCount()
method returns the
number of Unicode values found in a string.
Use the startIndex and endIndex parameters to specify where to begin and end the search.
The index of the first character is 0, the second character is 1, and so on.
public int codePointCount(int startIndex, int endIndex)
Parameter | Description |
---|---|
startIndex | An int value, representing the index to
the first character in the string |
endIndex | An int value, representing the index
after the last character in the string |
Returns: | An int value, representing the number of
Unicode values found in a string |
---|---|
Throws: | IndexOutOfBoundsException - if startIndex
is negative, or endindex is larger than the length of the string, or
startIndex is larger than endIndex |
Java Version: | 1.5 |
❮ String Methods