MCPcopy Create free account
hub / github.com/antlr/codebuff / addEscape

Method addEscape

output/java_guava/1.4.17/Escapers.java:154–160  ·  view source on GitHub ↗

Adds a replacement string for the given input character. The specified character will be replaced by the given string whenever it occurs in the input, irrespective of whether it lies inside or outside the 'safe' range. @param c the character to be replaced @param replacement the string to replace t

(char c, String replacement)

Source from the content-addressed store, hash-verified

152 */
153
154 @CanIgnoreReturnValue
155 public Builder addEscape(char c, String replacement) {
156 checkNotNull(replacement);
157 // This can replace an existing character (the builder is re-usable).
158 replacementMap.put(c, replacement);
159 return this;
160 }
161
162 /**
163 * Returns a new escaper based on the current state of the builder.

Callers 2

HtmlEscapersClass · 0.45
XmlEscapersClass · 0.45

Calls 2

putMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected