Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8343110 Add getChars(int, int, char[], int) to CharSequence and CharBuffer
  3. JDK-8354468

Release Note: New getChars(int, int, char[], int) Method in CharSequence and CharBuffer

XMLWordPrintable

      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.

            mkarg Markus Karg
            mkarg Markus Karg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: