Table of Contents

ToCasing Method

Definition

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

ToCasing(IDecorator<string>, CasingMethod)

Converts the enclosed string of the specified decorator to either lowercase, UPPERCASE, Title Case or unaltered.

public static string ToCasing(this IDecorator<string> decorator, CasingMethod method = CasingMethod.Default)

Parameters

decorator IDecorator<string>

The IDecorator<T> to extend.

method CasingMethod

The method to use in the conversion.

Returns

string

A string that corresponds to the enclosed string of the specified decorator with the applied conversion method.

Remarks

Uses InvariantCulture for the conversion.

Exceptions

ArgumentNullException

decorator cannot be null.

ToCasing(IDecorator<string>, CasingMethod, CultureInfo)

Converts the enclosed string of the specified decorator to either lowercase, UPPERCASE, Title Case or unaltered using the specified culture.

public static string ToCasing(this IDecorator<string> decorator, CasingMethod method, CultureInfo culture)

Parameters

decorator IDecorator<string>

The IDecorator<T> 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 the enclosed string of the specified decorator with the applied conversion method.

Exceptions

ArgumentNullException

decorator cannot be null -or- culture cannot be null.