src/main/java/de/blau/android/util/Util.java
/**
     * Naive counting of how many times a char is present in a string
     * 
     * @param string the String
     * @param c the char
     * @return the count
     */
Naive counting of how many times a char is present in a string

@param string the String
@param c the char
@return the count
Naive counting of how many times a char is present in a string @param string the String @param c the char @return the count
public static int countChar(@NonNull String string, char c) {
        int count = 0;
        for (int i = 0; i < string.length(); i++) {
            if (c == string.charAt(i)) {
                count++;
            }
        }
        return count;
    }
public static int countChar ( @ NonNull String string , char c ) { int count = 0 ; for ( int i = 0 ; i < string . length ( ) ; i ++ ) { if ( c == string . charAt ( i ) ) { count ++ ; } } return count ; }
Naive counting of how many times a char is present in a string
Naive counting of how many times a char is present in a string