String.ReplaceFirst(String, String) String.ReplaceFirst(String, String) Method

Definition

Replaces the first match for regularExpression within this string with the given replacement.

[Android.Runtime.Register("replaceFirst", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public string ReplaceFirst (string regex, string replacement);
member this.ReplaceFirst : string * string -> string

Parameters

regex
String String
replacement
String String

Returns

Exceptions

if regularExpression == null

Remarks

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

See also