public static boolean hasQuotes ( String input ) { if ( input == null || input . length ( ) < 2 ) { return false ; } return input . startsWith ( SINGLE_QUOTE ) && input . endsWith ( SINGLE_QUOTE ) || input . startsWith ( DOUBLE_QUOTE ) && input . endsWith ( DOUBLE_QUOTE ) ; }
Returns true if the input has single - quotes or double - quotes at both sides .