Table of Contents

CliStringUtil Class

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Provides CLI related string methods.

public static class CliStringUtil
Inheritance
CliStringUtil

Methods

AddPrefix(string, CliNamePrefixConvention)

Adds a specific prefix to the string.

FormatValue(object)

Formats a value as a printable string.

GetPrefixLength(string)

Gets the prefix (-, --, /) length from the string.

RemovePrefix(string)

Removes prefixes (-, --, /) from the string.

SplitPrefix(string)

Splits prefixes (-, --, /) from the string.

SplitWords(string, bool)

Splits a string in to words.

StripSuffixes(string, IEnumerable<string>, bool)

Strips specific suffixes from the string.

ToCase(string, CliNameCasingConvention, CultureInfo, bool)

Converts the string to a specific case.

ToLiteral(string, char)

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