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)
| 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. |
no test coverage detected