Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: ConsoleColoredString ReplaceText(string, string, StringComparison)

Declaration

public ConsoleColoredString ReplaceText(
    string oldValue,
    string newValue,
    StringComparison comparison = Ordinal
)

Summary

Returns a new ConsoleColoredString in which every occurrence of the text in oldValue is replaced with the text in newValue colored by the color of the first character in each match.

Parameters

stringoldValue The substring to search for.
stringnewValue The new string to replace every occurrence with.
StringComparisoncomparison A string comparison to use.

Returns

The new string after replacements.