code: public void copy(int srcIdx, char[] dst, int dstIdx, int length) {
          if (dst == null) {
              throw new NullPointerException("dst");
          }
  
          if (isOutOfBounds(srcIdx, length, length())) {
              throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + length("
                              + length + ") <= srcLen(" + length() + ')');
          }
  
          final int dstEnd = dstIdx + length;
          for (int i = dstIdx, j = srcIdx + arrayOffset(); i < dstEnd; i++, j++) {
              dst[i] = b2c(value[j]);
          }
      }
docs: Copied the content of this string to a character array.
  
  @param srcIdx the starting offset of characters to copy.
  @param dst the destination character array.
  @param dstIdx the starting offset in the destination byte array.
  @param length the number of characters to copy.