code: public static String dequote(String str) {
          char start = str.charAt(0);
          if ((start == '\'') || (start == '\"')) {
              // possibly quoted
              char end = str.charAt(str.length() - 1);
              if (start == end) {
                  // dequote
                  return str.substring(1, str.length() - 1);
              }
          }
          return str;
      }
docs: Remove quotes from a string, only if the input string start with and end with the same quote character.
  
  @param str the string to remove surrounding quotes from
  @return the de-quoted string