You can already copy a StringBuilder's contents into a String or another
StringBuilder.
What would Josh say? "Doesn't pull its weight." ?!

On Wed, Jul 18, 2018 at 7:29 AM, Isaac Levy <[email protected]> wrote:

> Is there any interest in a toCharArray method for StringBuilder?  I'm
> unable to to make a bug for it.
>
> Just a bit of sugar:
>
> char[] toCharArray() {
>   int length = length();
>   char[] dst = new char[length];
>   getChars(0, length, dst, 0);
>   return dst;
> }
>
> Regards,
> Isaac
>

Reply via email to