public static final StringBuilder trim(final StringBuilder content_buffer){
  char c;
  final int length=content_buffer.length();
  for (int i=length - 1; i > -1; i--) {
    c=content_buffer.charAt(i);
    if (c == ' ') {
      content_buffer.deleteCharAt(i);
    }
 else {
      i=-1;
    }
  }
  return content_buffer;
}

public static final StringBuilder trim ( final StringBuilder content_buffer ) { char c ; final int length = content_buffer . length ( ) ; for ( int i = length - 1 ; i > - 1 ; i -- ) { c = content_buffer . charAt ( i ) ; if ( c == ' ' ) { content_buffer . deleteCharAt ( i ) ; } else { i = - 1 ; } } return content_buffer ; }
remove any leading spaces
