Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @aws-sdk/util-utf8-browser

Index

Variables

Const TextDecoder

Const TextDecoder

TextDecoder: Function | undefined

Const TextEncoder

Const TextEncoder

TextEncoder: Function | undefined

Functions

Const fromUtf8

  • fromUtf8(input: string): Uint8Array
  • Converts a JS string from its native UCS-2/UTF-16 representation into a Uint8Array of the bytes used to represent the equivalent characters in UTF-8.

    Cribbed from the goog.crypt.stringToUtf8ByteArray function in the Google Closure library, though updated to use typed arrays.

    Parameters

    • input: string

    Returns Uint8Array

fromUtf8

  • fromUtf8(input: string): Uint8Array

Const fromUtf8

  • fromUtf8(input: string): Uint8Array

Const toUtf8

  • toUtf8(input: Uint8Array): string
  • Converts a typed array of bytes containing UTF-8 data into a native JS string.

    Partly cribbed from the goog.crypt.utf8ByteArrayToString function in the Google Closure library, though updated to use typed arrays and to better handle astral plane code points.

    Parameters

    • input: Uint8Array

    Returns string

toUtf8

  • toUtf8(input: Uint8Array): string

Const toUtf8

  • toUtf8(input: Uint8Array): string