Table of Contents

CliStringUtil.ToCase Method

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Converts the string to a specific case.

public static string ToCase(string value, CliNameCasingConvention nameCasingConvention, CultureInfo culture = null, bool keepSpaces = false)

Parameters

value string

A string instance.

nameCasingConvention CliNameCasingConvention

The name casing convention to convert to.

culture CultureInfo

An object that supplies culture-specific casing rules. If culture is null, the invariant culture is used.

keepSpaces bool

Whether to keep a single space between words if there were any whitespace or punctuation in the original. This works only for LowerCase, UpperCase, TitleCase which allows spaces.

Returns

string

A new string instance.