code: public HString substring(int relativeStart, int relativeEnd) {
        Preconditions.checkPositionIndexes(relativeStart, relativeEnd, length());
        return new Fragment(document(), start() + relativeStart, start() + relativeEnd);
     }
docs: Returns a new HString that is a substring of this one. The substring begins at the specified relativeStart and
  extends to the character at index relativeEnd - 1. Thus the length of the substring is relativeEnd-relativeStart.
  
  @param relativeStart the relative start within in this HString
  @param relativeEnd   the relative end within this HString
  @return the specified substring.
  @throws IndexOutOfBoundsException - if the relativeStart is negative, or relativeEnd is larger than the length of
  this HString object, or relativeStart is larger than relativeEnd.