docs: public String substringTrimmed(final int beginIndex, final int endIndex) {
          if (beginIndex < 0) {
              throw new IndexOutOfBoundsException("Negative beginIndex: " + beginIndex);
          }
          if (endIndex > this.len) {
              throw new IndexOutOfBoundsException("endIndex: " + endIndex + " > length: " + this.len);
          }
          if (beginIndex > endIndex) {
              throw new IndexOutOfBoundsException("beginIndex: " + beginIndex + " > endIndex: " + endIndex);
          }
          int beginIndex0 = beginIndex;
          int endIndex0 = endIndex;
          while (beginIndex0 < endIndex && isWhitespace(this.array[beginIndex0])) {
              beginIndex0++;
          }
          while (endIndex0 > beginIndex0 && isWhitespace(this.array[endIndex0 - 1])) {
              endIndex0--;
          }
          return new String(this.array, beginIndex0, endIndex0 - beginIndex0);
      }