static S substring(S s, int x) { ret substring(s, x, l(s)); } static S substring(S s, int x, int y) { if (s == null) return null; if (x < 0) x = 0; if (x > s.length()) return ""; if (y < x) y = x; if (y > s.length()) y = s.length(); return s.substring(x, y); } ifclass IntRange static L substring(s, IntRange r) { ret r == null ? null : substring(l, r.start, r.end); } endif