class QuotedCSV implements Iterable<String> {

    public static String unquote(String s) {
        if (!StringUtils.hasText(s)) {
            return s;
        }
        // handle trivial cases
        int l = s.length();
        // Look for any quotes
        int i = 0;
        for (; i < l; i++) {
            char c = s.charAt(i);
            if (c == '"')
                break;
        }
        if (i == l)
            return s;

        boolean quoted = true;
        boolean sloshed = false;
        StringBuilder buffer = new StringBuilder();
        buffer.append(s, 0, i);
        i++;
        for (; i < l; i++) {
            char c = s.charAt(i);
            if (quoted) {
                if (sloshed) {
                    buffer.append(c);
                    sloshed = false;
                } else if (c == '"')
                    quoted = false;
                else if (c == '\\')
                    sloshed = true;
                else
                    buffer.append(c);
            } else if (c == '"')
                quoted = true;
            else
                buffer.append(c);
        }
        return buffer.toString();
    }

    public  QuotedCSV(String... values);
    public  QuotedCSV(boolean keepQuotes, String... values);

}