static bool isRepetitionOfCharacter(S s, char c) { if (empty(s)) false; for i over s: if (s.charAt(i) != c) false; true; }