ToCasing Method
Definition
- Namespace
- Cuemon
- Assemblies
- Cuemon.Core.dll
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
decoratorIDecorator<string>The IDecorator<T> to extend.
methodCasingMethodThe method to use in the conversion.
Returns
- string
A string that corresponds to the enclosed string of the specified
decoratorwith the applied conversionmethod.
Remarks
Uses InvariantCulture for the conversion.
Exceptions
- ArgumentNullException
decoratorcannot 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
decoratorIDecorator<string>The IDecorator<T> to extend.
methodCasingMethodThe method to use in the conversion.
cultureCultureInfoThe culture rules to apply the conversion.
Returns
- string
A string that corresponds to the enclosed string of the specified
decoratorwith the applied conversionmethod.
Exceptions
- ArgumentNullException
decoratorcannot be null -or-culturecannot be null.