StringExtensionsToCase Method
Converts the string to a specific case.
Namespace: DotMake.CommandLineAssembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 2.5.6
public static string ToCase(
this string value,
CliNameCasingConvention nameCasingConvention,
CultureInfo culture = null,
bool keepSpaces = false
)
- value String
- A string instance.
- nameCasingConvention CliNameCasingConvention
- The name casing convention to convert to.
- culture CultureInfo (Optional)
- An object that supplies culture-specific casing rules. If culture is , the invariant culture is used.
- keepSpaces Boolean (Optional)
-
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.
StringA new
String instance.In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).