static Substring substringObject(CharSequence s, int x) { ret substringObject(s, x, l(s)); } static Substring substringObject(CharSequence s, int x, int y) { if (s == null) null; if (x < 0) x = 0; if (x > s.length()) x = s.length(); if (y < x) y = x; if (y > s.length()) y = s.length(); ret new Substring(s, x, y); }