Character.codePointCount(char[] a, int offset, int count) has the following syntax.
public static int codePointCount(char[] a, int offset, int count)
In the following code shows how to use Character.codePointCount(char[] a, int offset, int count) method.
/*from w ww. ja v a2s . c o m*/ public class Main { public static void main(String[] args) { char[] c = new char[] { 'a', 'b', 'c', 'd', 'e' }; int offset = 1, count = 3; int res = Character.codePointCount(c, offset, count); String str = "Number of Unicode code points is " + res; System.out.println( str ); } }
The code above generates the following result.