sS substringFromCharArray(char[] s, int x) { ret substringFromCharArray(s, x, l(s)); } sS substringFromCharArray(char[] s, int x, int y) { if (s == null) null; if (x < 0) x = 0; if (x >= s.length) ret ""; if (y < x) y = x; if (y > s.length) y = s.length; ret new S(s, x, y-x); }