Module

Data.TextDecoder

#decode

decode :: forall a. Encoding -> (ArrayView a) -> Either Error String

Decodes an ArrayBufferView with the given Encoding. Returns an Error if decoding fails.

#decodeUtf8

decodeUtf8 :: forall a. (ArrayView a) -> Either Error String

Decodes a UTF-8 encoded typed array to a (UTF-16) String. Returns an Error if decoding fails. This function is provided as a convenience as UTF-8 is the encoding you will probably be using most of the time.

Modules