code: public String getSubstring(Part part) {
          int index=part.index;
          return msg.substring(index, index+part.length);
      }
docs: Returns the substring of the pattern string indicated by the Part.
  Convenience method for getPatternString().substring(part.getIndex(), part.getLimit()).
  @param part a part of this MessagePattern.
  @return the substring associated with part.