Table of Contents

CliStringUtil.ToLiteral Method

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Gets an escaped string literal. Value is enclosed with double quotes and Unicode and ASCII non-printable characters are escaped.

public static string ToLiteral(this string value, char quoteChar = '"')

Parameters

value string

A string instance.

quoteChar char

The enclosing quote char, by default it's double quotes.

Returns

string

A new string instance.