function toUtf8String(bytes, onError?): string

Returns the string represented by the UTF-8 data bytes.

When onError function is specified, it is called on UTF-8 errors allowing recovery using the Utf8ErrorFunc API. (default: error)

Parameters

ParameterTypeDescription
bytesBytesLikeThe UTF-8 data to convert.
onError?Utf8ErrorFuncThe error handling function.

Returns

string

The string.

Source

encoding/utf8.ts:350