private static String removeTrailingSpace(String raw){
  char c;
  int i=raw.length() - 1;
  for (; i >= 0; i--) {
    c=raw.charAt(i);
    if (c != ' ' && c != '\t') {
      break;
    }
  }
  return raw.substring(0,i + 1);
}

private static String removeTrailingSpace ( String raw ) { char c ; int i = raw . length ( ) - 1 ; for ( ; i >= 0 ; i -- ) { c = raw . charAt ( i ) ; if ( c != ' ' && c != '\t' ) { break ; } } return raw . substring ( 0 , i + 1 ) ; }
remove trailing space and tab from the raw string and return the new string .
