Returns the UTF-8 byte representation of str
.
If form
is specified, the string is normalized.
Parameter | Type | Description |
---|---|---|
str | string | The string to convert. |
form ? | UnicodeNormalizationForm | The normalization form to use. |
Uint8Array
The UTF-8 byte representation.
If the UTF-8 conversion fails.
Returns the UTF-8 byte representation of str
.
If form
is specified, the string is normalized.
Parameter | Type | Description |
---|---|---|
str | string | The string to convert. |
form ? | UnicodeNormalizationForm | The normalization form to use. |
Uint8Array
The UTF-8 byte representation.
If the UTF-8 conversion fails.