static char lastChar(S s) { ret empty(s) ? '\0' : s.charAt(l(s)-1); }