ToEncodedString Method
Definition
- Namespace
- Cuemon
- Assemblies
- Cuemon.Core.dll
ToEncodedString(IDecorator<string>, Action<FallbackEncodingOptions>)
Encodes all the characters in the enclosed string of the specified decorator to its encoded string variant.
public static string ToEncodedString(this IDecorator<string> decorator, Action<FallbackEncodingOptions> setup = null)
Parameters
decoratorIDecorator<string>The IDecorator<T> to extend.
setupAction<FallbackEncodingOptions>The FallbackEncodingOptions which may be configured.
Returns
- string
A string variant of the enclosed string of the specified
decoratorthat is encoded with TargetEncoding.
Remarks
The inspiration for this method was retrieved @ SO: https://stackoverflow.com/a/135473/175073.
Exceptions
- ArgumentNullException
decoratorcannot be null.