Table of Contents

Class AnsiUtility

Namespace
Xunit.Sdk

A utility class for ANSI color escape codes.

public static class AnsiUtility
Inheritance
AnsiUtility
Inherited Members

Properties

AnsiEscapeCodeRegex

Gets a regular expression that can used to find ANSI color escape codes.

public static Regex AnsiEscapeCodeRegex { get; }

Property Value

Regex

Methods

RemoveAnsiEscapeCodes(string)

Strip ANSI color escape codes (in the form of ESC[1;2m) from a string value.

public static string RemoveAnsiEscapeCodes(string message)

Parameters

message string

The message that may contain ANSI color escape codes

Returns

string

The message without the ANSI color escape codes