-
Sub-task
-
Resolution: Delivered
-
P4
-
25
New method `getChars(int, int, char[], int)` has been added to `java.lang.CharSequence` and `java.nio.CharBuffer` to bulk-read characters from a region of a `CharSequence` into a region of a `char[]`. `String`, `StringBuilder`, and `CharBuffer` implement `CharSequence`. Code that operates on a `CharSequence` should no longer need to special-case and cast to `String` when needing to bulk-read from a sequence. The new method may be more efficient than a loop over characters of the sequence.