static public String backslashUnescape ( String x ) { if ( ! x . contains ( "\\" ) ) return x ; // gotta do it StringBuilder sb = new StringBuilder ( x . length ( ) ) ; for ( int pos = 0 ; pos < x . length ( ) ; pos ++ ) { char c = x . charAt ( pos ) ; if ( c == ' ' ) { c = x . charAt ( ++ pos ) ; // skip backslash, get next cha } sb . append ( c ) ; } return sb . toString ( ) ; }
backslash unescape a string