Code example for Escaper

Methods: escape

0
        if (!omitNullValues || value != null) {
            s.append(' ').append(name).append('=');
            if (value != null) { 
                String stringValue = value.toString();
                if (NEEDS_QUOTING.matchesAnyOf(stringValue)) {
                    s.append('"').append(AS_QUOTED_VALUE.escape(stringValue)).append('"');
                } else { 
                    s.append(stringValue);
                } 
            } 
        } 
        return this;
    } 
 
    /** 
     * Add a key-value pair.  If the value is not null then value's string value 
     * is escaped and written in quotes. 
     * <p> 
     * A null value is handled in one of two ways: by default, a null value is 
     * equivalent to the empty string; however, if omitNullValues is specified 
Contextual code suggestions in your IDE  Get Codota for Java