[RFC] StringBuilder.toCharArray

Isaac Levy isaac.r.levy at gmail.com
Wed Jul 18 14:29:21 UTC 2018

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;


More information about the core-libs-dev mailing list