public static int countCodePoint(String string, CodePointPredicate predicate)
    {
        int count = 0;
        int size = string.length();
        for (int i = 0; i < size; )
        {
            int codePoint = string.codePointAt(i);
            if (predicate.accept(codePoint))
            {
                count++;
            }
            i += Character.charCount(codePoint);
        }
        return count;
    }
public static int countCodePoint ( String string , CodePointPredicate predicate ) { int count = 0 ; int size = string . length ( ) ; for ( int i = 0 ; i < size ; ) { int codePoint = string . codePointAt ( i ) ; if ( predicate . accept ( codePoint ) ) { count ++ ; } i += Character . charCount ( codePoint ) ; } return count ; }
Count the number of elements that return true for the specified {@code predicate}.

@since 7.0