Add getChars to CharSequence

Mike Duigou mike.duigou at
Thu Apr 11 00:47:37 UTC 2013

Seems like a nice extension to me.


On Apr 10 2013, at 17:40 , Martin Buchholz wrote:

> I've often wished that CharSequence had getChars methods, as many of the concrete implementations already do.
> In jdk8 with default methods, this is possible!
> This will make some of the String code a little nicer and more efficient.
> Here's a preliminary patch in this direction, that overlaps with some of the work done in 
> 6206780: (str) Forwarding append methods in String{Buffer,Builder} are inconsistent
> Summary: update StringBuilder & StringBuffer to consistently handle forwarding to AbstractStringBuilder. Some additional cleanup (removal of refs to sub-classes from AbstractStringBuilder)
> If we have consensus that this is a good idea, I can flesh this out.

More information about the core-libs-dev mailing list