Matcher.QuoteReplacement(String) Method

Definition

Returns a literal replacement String for the specified String.

[Android.Runtime.Register("quoteReplacement", "(Ljava/lang/String;)Ljava/lang/String;", "")]
public static string QuoteReplacement (string s);
[<Android.Runtime.Register("quoteReplacement", "(Ljava/lang/String;)Ljava/lang/String;", "")>]
static member QuoteReplacement : string -> string

Parameters

s
String

The string to be literalized

Returns

A literal string replacement

Attributes

Remarks

Returns a literal replacement String for the specified String.

This method produces a String that will work as a literal replacement s in the appendReplacement method of the Matcher class. The String produced will match the sequence of characters in s treated as a literal sequence. Slashes ('\') and dollar signs ('$') will be given no special meaning.

Added in 1.5.

Java documentation for java.util.regex.Matcher.quoteReplacement(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to