Class CharConverter
This utility class is designed to make System.Char related conversions easier to work with.
Inheritance
System.Object
CharConverter
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class CharConverter
Methods
| Improve this DocFromStream(Stream, Action<EncodingOptions>)
Converts the given System.IO.Stream to a char array starting from position 0 (when supported).
Declaration
public static char[] FromStream(Stream value, Action<EncodingOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | value | The System.IO.Stream value to be converted. |
System.Action<EncodingOptions> | setup | The EncodingOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Char[] | A sequence of characters equivalent to the System.IO.Stream value. |
Remarks
EncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.
FromString(String, Action<EncodingOptions>)
Converts the given System.String to an equivalent sequence of characters.
Declaration
public static char[] FromString(string value, Action<EncodingOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The System.String value to be converted. |
System.Action<EncodingOptions> | setup | The EncodingOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Char[] | A sequence of characters equivalent to the System.String value. |
Remarks
EncodingOptions will be initialized with DefaultPreambleSequence and DefaultEncoding.