question: public static String quote ( String s ) { if ( s == null ) return null ; if ( s . length ( ) == 0 ) return "\"\"" ; StringBuffer b = new StringBuffer ( s . length ( ) + 8 ) ; quote ( b , s ) ; return b . toString ( ) ; }
target:  Quote a string. The string is quoted only if quoting is required due to embeded delimiters, quote characters or the empty string.