code: private static int transform(final CharSequence src, final int srcPos, final int srcLen, final char[] dest, final int destPos) {
          int offset = destPos;
          for (int i = srcPos; i < srcLen; i++) {
              char c = src.charAt(i);
              if (c >= '0' && c <= '9') {
                  dest[offset++] = c;
              } else if (c >= 'A' && c <= 'Z') {
                  int tmp = 10 + (c - 'A');
                  dest[offset++] = (char)('0' + tmp / 10);
                  dest[offset++] = (char)('0' + tmp % 10);
              } else if (c >= 'a' && c <= 'z') {
                  int tmp = 10 + (c - 'a');
                  dest[offset++] = (char)('0' + tmp / 10);
                  dest[offset++] = (char)('0' + tmp % 10);
              } else if (c != ' ') {
                  throw new IllegalArgumentException("Invalid character '" + c + "'.");
              }
          }
          return offset;
      }
docs: Copies {@code src[srcPos...srcLen)} into {@code dest[destPos)} while applying character to numeric transformation and skipping over space (ASCII 0x20) characters.
  @param src the data to begin copying, must contain only characters {@code [A-Za-z0-9 ]}.
  @param srcPos the index in {@code src} to begin transforming (inclusive).
  @param srcLen the number of characters starting from {@code srcPos} to transform.
  @param dest the buffer to write transformed characters into.
  @param destPos the index in {@code dest} to begin writing.
  @return the value of {@code destPos} incremented by the number of characters that were added, i.e. the next unused index in {@code dest}.
  @throws IllegalArgumentException if {@code src} contains an unsupported character.
  @throws ArrayIndexOutOfBoundsException if {@code dest} does not have enough capacity to store the transformed result (keep in mind that a single character from {@code src} can expand to two characters in {@code dest}).