public static String quoteComment ( String comment ) { int len = comment . length ( ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = comment . charAt ( i ) ; if ( c == ' ' || c == ' ' || c == ' ' ) { sb . append ( ' ' ) ; } sb . append ( c ) ; } return sb . toString ( ) ; }
Returns the comment with internal backslashes and parentheses preceded by backslashes . The outer parentheses themselves are not added by this method .