static int countChar(S s, char c) { int n = 0, l = l(s); for (int i = 0; i < l; i++) if (s.charAt(i) == c) ++n; ret n; }