static int smartLastIndexOf(S s, char c) { if (s == null) ret 0; i = s.lastIndexOf(c); ret i >= 0 ? i : l(s); }