MCPcopy Create free account
hub / github.com/google/re2j / quote

Method quote

java/com/google/re2j/Pattern.java:294–296  ·  view source on GitHub ↗

Returns a literal pattern string for the specified string. This method produces a string that can be used to create a Pattern that would match the string s as if it were a literal pattern. Metacharacters or escape sequences in the input sequence will be given no s

(String s)

Source from the content-addressed store, hash-verified

292 * @return A literal string replacement
293 */
294 public static String quote(String s) {
295 return RE2.quoteMeta(s);
296 }
297
298 @Override
299 public String toString() {

Callers 1

testQuoteMethod · 0.95

Calls 1

quoteMetaMethod · 0.95

Tested by 1

testQuoteMethod · 0.76