static bool isWordsAndSpaces(S s) { for i over s: { char c = s.charAt(i); if (!isSpace(c) && !isLetterOrDigit(c)) false; } true; }