String.ReplaceFirst(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Replaces the first substring of this string that matches the given <a href=".
[Android.Runtime.Register("replaceFirst", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public string ReplaceFirst (string regex, string replacement);
[<Android.Runtime.Register("replaceFirst", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")>]
member this.ReplaceFirst : string * string -> string
Parameters
- regex
- String
the regular expression to which this string is to be matched
- replacement
- String
the string to be substituted for the first match
Returns
The resulting String
- Attributes
Exceptions
if regularExpression == null
Remarks
Java documentation for java.lang.String.replaceFirst(java.lang.String, 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.