code: private void checkBounds(String source, Integer from, Integer to) throws TransformationOperationException {
          Integer length = source.length();
          if (from > to) {
              throw new TransformationOperationException(
                  "The from parameter is bigger than the to parameter");
          }
          if (from < 0 || from > length) {
              throw new TransformationOperationException(
                  "The from parameter is not fitting to the size of the source");
          }
          if (to < 0 || to > length) {
              throw new TransformationOperationException(
                  "The to parameter is not fitting to the size of the source");
          }
      }
docs: Checks if the from and the to parameters are valid for the given source