public static String unescapeSQLString ( String b ) { if ( b . charAt ( 0 ) == ' ' && b . charAt ( b . length ( ) - 1 ) == ' ' ) b = b . substring ( 1 , b . length ( ) - 1 ) ; return StringEscapeUtils . unescapeJava ( b ) ; }
Strips leading and trailing characters and handles and escaped characters such as \ n \ r etc .