/** * Return the count of the characters in the string. * * @param in * @param c * @return count of chars or 0 if 'in' is null */ public static int countCharacters(String in, char[] c) { int res = 0; if (in == null || c == null) return 0; for (char cc : c) { res+=countCharacters(in,cc); } return res; }