/ fm / liveswitch / Utf8
Class: Utf8
fm.liveswitch.Utf8
UTF-8 encoding/decoding utility.
Table of contents
Constructors
Methods
Constructors
constructor
+ new Utf8(): Utf8
Returns: Utf8
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:11
Methods
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:9
decode
▸ Static
decode(buffer
: DataBuffer): string
Decodes a UTF-8 data buffer to a string.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
DataBuffer | The input byte array. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:29
▸ Static
decode(input
: Uint8Array): string
Decodes a UTF-8 byte array to a string.
Parameters:
Name | Type | Description |
---|---|---|
input |
Uint8Array | The input byte array. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:36
▸ Static
decode(input
: Uint8Array, index
: number, length
: number): string
Decodes a UTF-8 byte array to a string.
Parameters:
Name | Type | Description |
---|---|---|
input |
Uint8Array | The input byte array. |
index |
number | The index to start reading. |
length |
number | The length. |
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:45
encode
▸ Static
encode(input
: string): Uint8Array
Encodes a string to a UTF-8 byte array.
Parameters:
Name | Type | Description |
---|---|---|
input |
string | The input string. |
Returns: Uint8Array
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:68
getByteCount
▸ Static
getByteCount(input
: string): number
Gets the number of bytes that would be returned by a call to encode.
Parameters:
Name | Type | Description |
---|---|---|
input |
string | The input string. |
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/Utf8.ts:82