code: public static <T extends Annotation> T trim(T annotation, char... ws) {
  		final char[] s = annotation.getCoveredText().toCharArray();
  		if (s.length == 0)
  			return annotation;
  
  		int b = 0;
  		while (ArrayUtils.contains(ws, s[b])) {
  			b++;
  		}
  
  		int e = 0;
  		while (ArrayUtils.contains(ws, s[(s.length - 1) - e])) {
  			e++;
  		}
  		annotation.setBegin(annotation.getBegin() + b);
  		annotation.setEnd(annotation.getEnd() - e);
  		return annotation;
  	}
docs: trims the annotated text. Similar to {@link String#trim()}, this method
  moves the begin and end indexes towards the middle as long as there is
  whitespace.
  
  The method throws a ArrayIndexOutOfBoundsException if the entire
  annotation consists of whitespace.
  
  @param annotation
  The annotation to trim
  @param ws
  An array of chars that are to be considered whitespace
  @param <T>
  The annotation type
  @return The trimmed annotation (not a copy)
  @since 0.4.1