Class Ascii
ASCII encoding/decoding utility.
Inheritance
System.Object
Ascii
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Ascii
Methods
Decode(Byte[])
Decodes a UTF-8 byte array to a string.
Declaration
public static string Decode(byte[] input)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input byte array. |
Returns
Type | Description |
---|---|
System.String |
Decode(Byte[], Int32, Int32)
Decodes a UTF-8 byte array to a string.
Declaration
public static string Decode(byte[] input, int index, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | input | The input byte array. |
System.Int32 | index | The index to start reading. |
System.Int32 | length | The length. |
Returns
Type | Description |
---|---|
System.String |
Encode(String)
Encodes a string to a UTF-8 byte array.
Declaration
public static byte[] Encode(string input)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | The input string. |
Returns
Type | Description |
---|---|
System.Byte[] |
GetByteCount(String)
Gets the number of bytes that would be returned by a call to encode.
Declaration
public static int GetByteCount(string input)
Parameters
Type | Name | Description |
---|---|---|
System.String | input | The input string. |
Returns
Type | Description |
---|---|
System.Int32 |