CharSequence (int start, int end) { if (start == 0 && end == length()) return this; if (start < s1.length() && end < s1.length()) return s1.subSequence(start, end); if (start >= s1.length() && end >= s1.length()) return s2.subSequence(start - s1.length(), end - s1.length()); return new MergingCharSequence(s1.subSequence(start, s1.length()), s2.subSequence(0, end - s1.length())); }