Class StringFactory
Provides access to factory methods for creating and configuring encoded String instances.
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class StringFactory
Methods
| Improve this Doc View SourceCreateBinaryDigits(Byte[])
Creates a binary digits string representation from the specified value
.
Declaration
public static string CreateBinaryDigits(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | value | The byte[] to convert. |
Returns
Type | Description |
---|---|
String | A binary digits string representation that is equivalent to |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
CreateHexadecimal(Byte[])
Creates a hexadecimal string representation from the specified value
.
Declaration
public static string CreateHexadecimal(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | value | The byte[] to convert. |
Returns
Type | Description |
---|---|
String | A hexadecimal string representation that is equivalent to |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
CreateHexadecimal(String, Action<EncodingOptions>)
Creates a hexadecimal string representation from the specified value
.
Declaration
public static string CreateHexadecimal(string value, Action<EncodingOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
String | value | The String to convert. |
Action<EncodingOptions> | setup | The EncodingOptions which may be configured. |
Returns
Type | Description |
---|---|
String | A hexadecimal string representation that is equivalent to |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
InvalidEnumArgumentException |
|
CreateProtocolRelativeUrl(Uri, Action<ProtocolRelativeUriStringOptions>)
Creates a protocol-relative URL string representation from the specified value
.
Declaration
public static string CreateProtocolRelativeUrl(Uri value, Action<ProtocolRelativeUriStringOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | value | The Uri to convert. |
Action<ProtocolRelativeUriStringOptions> | setup | The ProtocolRelativeUriStringOptions which may be configured. |
Returns
Type | Description |
---|---|
String | A protocol-relative URL string representation that is equivalent to |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
ArgumentException |
|
CreateUriScheme(UriScheme)
Creates an URI scheme string representation from the specified value
.
Declaration
public static string CreateUriScheme(UriScheme value)
Parameters
Type | Name | Description |
---|---|---|
UriScheme | value | The UriScheme to convert. |
Returns
Type | Description |
---|---|
String | An URI scheme string representation that is equivalent to |
CreateUrlEncodedBase64(Byte[])
Creates a base64 string representation, in URL-safe characters, from the specified value
.
Declaration
public static string CreateUrlEncodedBase64(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | value | The byte[] to convert. |
Returns
Type | Description |
---|---|
String | A base64 string representation, in URL-safe characters, that is equivalent to |
Remarks
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|