Table of Contents

ReplaceAll Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/StringExtensions.cs

ReplaceAll(string, string, string, StringComparison)

Replaces all occurrences of oldValue in value, with newValue.

public static string ReplaceAll(this string value, string oldValue, string newValue, StringComparison comparison = StringComparison.OrdinalIgnoreCase)

Parameters

value string

The string to extend.

oldValue string

The string value to be replaced.

newValue string

The string value to replace all occurrences of oldValue.

comparison StringComparison

One of the enumeration values that specifies the rules to use in the comparison. Default is OrdinalIgnoreCase.

Returns

string

A string equivalent to value but with all instances of oldValue replaced with newValue.