public static String generateToken(Predicate predicate) {
        TokenBuilder builder = new TokenBuilder();
        for (int c = 0; c <= 0xffff; ++c) {
            if (!predicate.accepts((char)c)) {
                continue;
            }
            builder.add(c);
        }
        return builder.build();
    }
Removes leading and trailing quotation mark from the given string. This method will properly unescape whatever
content is withing the string literal as well.

@param str The string to unquote.
@return The unquoted string.
vespajlib/src/main/java/com/yahoo/javacc/UnicodeUtilities.java