sbool endsWithSpace(S s) { ret nempty(s) && isSpace(last(s)); }