Table of Contents

ToCasing Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/StringExtensions.cs

ToCasing(string, CasingMethod)

Converts the specified value to either lowercase, UPPERCASE, Title Case or unaltered.

public static string ToCasing(this string value, CasingMethod method = CasingMethod.Default)

Parameters

value string

The string to extend.

method CasingMethod

The method to use in the conversion.

Returns

string

A string that corresponds to value with the applied conversion method.

Remarks

Uses InvariantCulture for the conversion.

ToCasing(string, CasingMethod, CultureInfo)

Converts the specified value to either lowercase, UPPERCASE, Title Case or unaltered using the specified culture.

public static string ToCasing(this string value, CasingMethod method, CultureInfo culture)

Parameters

value string

The string to extend.

method CasingMethod

The method to use in the conversion.

culture CultureInfo

The culture rules to apply the conversion.

Returns

string

A string that corresponds to value with the applied conversion method.

Exceptions

ArgumentNullException

value cannot be null -or- culture cannot be null.