private static String dequote(String s) {
            boolean quoted = s.startsWith(QUOTE);
            int end = s.length();
            boolean closeQuote = false;
            for (int i = 0; i < s.length(); i++) {
                closeQuote = quoted && i > 0 && unescapedQuoteAt(i, s);
                boolean startComment = !quoted && isComment(String.valueOf(s.charAt(i)));
                if (closeQuote || startComment) {
                    end = i;
                    if (quoted && end < s.length() - 1) {
                        String trailing = s.substring(end + 1).trim();
                        if (!isComment(trailing)) {
                            throw new IllegalArgumentException("Additional character(s) after end quote at column " + end);
                        }
                    }
                    break;
                }
            }
            if (quoted && !closeQuote) {
                throw new IllegalArgumentException("Missing closing quote");
            }
            int start = quoted ? 1 : 0;
            String value = s.substring(start, end);
            return quoted ? value : value.trim();
        }
Parse an INI configuration from given input
vespajlib/src/main/java/com/yahoo/config/ini/Ini.java