Class EncodingOptionsExtensions
- Namespace
- Cuemon.Extensions.Text
- Assembly
- Cuemon.Extensions.Text.dll
Extension methods for the IEncodingOptions interface.
public static class EncodingOptionsExtensions
- Inheritance
-
EncodingOptionsExtensions
Methods
DetectUnicodeEncoding(IEncodingOptions, byte[])
Tries to detect an Encoding object from the specified bytes.
If unsuccessful, the Encoding value is returned.
public static Encoding DetectUnicodeEncoding(this IEncodingOptions options, byte[] bytes)
Parameters
optionsIEncodingOptionsThe IEncodingOptions to extend.
bytesbyte[]
Returns
- Encoding
Either the detected encoding of
bytesor the encoding of this instance.
DetectUnicodeEncoding(IEncodingOptions, Stream)
Tries to detect an Encoding object from the specified stream.
If unsuccessful, the Encoding value is returned.
public static Encoding DetectUnicodeEncoding(this IEncodingOptions options, Stream stream)
Parameters
optionsIEncodingOptionsThe IEncodingOptions to extend.
streamStream
Returns
- Encoding
Either the detected encoding of
streamor the encoding of this instance.