code: public CharSequence getCoveredText(CharSequence text) {
      if (getEnd() > text.length()) {
        throw new IllegalArgumentException("The span " + toString()
            + " is outside the given text!");
      }
  
      return text.subSequence(getStart(), getEnd());
    }
docs: Retrieves the string covered by the current span of the specified text.
  
  @param text
  
  @return the substring covered by the current span