public void trim(String aText,int[] aSpan){
  int begin=aSpan[0];
  int end=aSpan[1] - 1;
  String data=aText;
  while ((begin < (data.length() - 1)) && trimChar(data.charAt(begin))) {
    begin++;
  }
  while ((end > 0) && trimChar(data.charAt(end))) {
    end--;
  }
  end++;
  aSpan[0]=begin;
  aSpan[1]=end;
}

public void trim ( String aText , int [ ] aSpan ) { int begin = aSpan [ 0 ] ; int end = aSpan [ 1 ] - 1 ; String data = aText ; while ( ( begin < ( data . length ( ) - 1 ) ) && trimChar ( data . charAt ( begin ) ) ) { begin ++ ; } while ( ( end > 0 ) && trimChar ( data . charAt ( end ) ) ) { end -- ; } end ++ ; aSpan [ 0 ] = begin ; aSpan [ 1 ] = end ; }
remove trailing or leading whitespace from the annotation .
