code: public static Expression substr(Expression expression, int position, int length) {
          return x("SUBSTR(" + expression.toString() + ", " + position + ", " + length + ")");
      }
docs: Returned expression results in a substring from the integer position of the given length.
  
  The position is zero-based, i.e. the first position is 0.
  If position is negative, it is counted from the end of the string; -1 is the last position in the string.