Argentini.Halide.H3Text.ReplaceFirst C# (CSharp) Method

ReplaceFirst() public static method

Replaces the first occurrence of a string with the replacement value. The Replace is case senstive.
public static ReplaceFirst ( string input, string oldValue, string newValue ) : String
input string The string to examine.
oldValue string The value to replace.
newValue string the new value to be inserted.
return String
        public static String ReplaceFirst(string input, string oldValue, string newValue)
        {
            Regex regEx = new Regex(oldValue, RegexOptions.Multiline);
            return regEx.Replace(input, newValue, 1);
        }