public static String removeBackslashEscape ( String value ) { StringBuffer sb = new StringBuffer ( ) ; int i , n = value . length ( ) ; char ch ; boolean lastIsEscape = false ; for ( i = 0 ; i < n ; i ++ ) { ch = value . charAt ( i ) ; if ( lastIsEscape ) { sb . append ( ch ) ; lastIsEscape = false ; } else { if ( ch == ' ' ) lastIsEscape = true ; else sb . append ( ch ) ; } } return sb . toString ( ) ; }
Remove backslashes that are used as escape characters