Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ascii

ASCII encoding/decoding utility.

Hierarchy

  • Ascii

Index

Constructors

constructor

  • Returns Ascii

Methods

getTypeString

  • getTypeString(): string
  • Returns string

Static decode

  • decode(input: Uint8Array, index: number, length: number): string
  • decode(input: Uint8Array): string
  • Decodes a UTF-8 byte array to a string.

    Parameters

    • input: Uint8Array

      The input byte array.

    • index: number

      The index to start reading.

    • length: number

      The length.

    Returns string

  • Decodes a UTF-8 byte array to a string.

    Parameters

    • input: Uint8Array

      The input byte array.

    Returns string

Static encode

  • encode(input: string): Uint8Array
  • Encodes a string to a UTF-8 byte array.

    Parameters

    • input: string

      The input string.

    Returns Uint8Array

Static getByteCount

  • getByteCount(input: string): number
  • Gets the number of bytes that would be returned by a call to encode.

    Parameters

    • input: string

      The input string.

    Returns number