public static String unQuote ( String text ) { if ( isNullOrEmptyTrimmed ( text ) ) { return text ; } if ( ( text . startsWith ( "\"" ) && text . endsWith ( "\"" ) ) || ( text . startsWith ( "'" ) && text . endsWith ( "'" ) ) ) { return text . substring ( 1 , text . length ( ) - 1 ) ; } return text ; }
Removes double or single quotes if any are present