} else if (csq instanceof TextBuilder) {
TextBuilder tb = (TextBuilder) csq;
tb.getChars(index, index + count, cbuf, off);
} else if (csq instanceof CharArray) {
CharArray ca = (CharArray) csq;
System.arraycopy(ca.array(), index + ca.offset(), cbuf, off, count);
} else { // Generic CharSequence.
for (int i = off, n = off + count, j = index; i < n;) {
cbuf[i++] = input.charAt(j++);
}
}