Search Results for

    / fm / liveswitch / Utf8

    Class: Utf8

    fm.liveswitch.Utf8

    UTF-8 encoding/decoding utility.

    Table of contents

    Constructors

    • constructor

    Methods

    • getTypeString
    • decode
    • encode
    • getByteCount

    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

    ▸ Staticdecode(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

    ▸ Staticdecode(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

    ▸ Staticdecode(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

    ▸ Staticencode(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

    ▸ StaticgetByteCount(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

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0