public static void esc ( StringBuffer in ) { if ( in == null ) { return ; } replaceAll ( in , "\\" , "\\\\" ) ; replaceAll ( in , "'" , "\\'" ) ; replaceAll ( in , "\"" , "\\\"" ) ; replaceAll ( in , "\n" , "\\n" ) ; replaceAll ( in , "\r" , "\\r" ) ; }
Escapes quotes double quotes ecape characters and end - of - line characters in strings