public static int occurrencesOfChar ( String string , final char value ) { return StringIterate . countChar ( string , new CharPredicate ( ) { public boolean accept ( char character ) { return value == character ; } } ) ; }
Count the number of occurrences of the specified char .