code: public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
          if (srcBegin < 0) {
              throw new StringIndexOutOfBoundsException(srcBegin);
          }
          if (srcBegin > srcEnd) {
              throw new StringIndexOutOfBoundsException(srcEnd - srcBegin);
          }
          int sz = size();
          if (srcEnd > sz) {
              throw new StringIndexOutOfBoundsException(srcEnd);
          }
          System.arraycopy(buf, toInternalId(srcBegin), dst, dstBegin, srcEnd - srcBegin);
      }
docs: --- String utilities ---