static bool endsWithLetterOrDigit(S s) { ret nempty(s) && isLetterOrDigit(lastCharacter(s)); }