...
Argument | Type | Description |
---|---|---|
string | String | The string to be processed. |
encoding | String | The character encoding to use. |
...
byteLength('ab\u1e09', 'UTF-8')
Returns 5 (, which is the length of the string in bytes when using the UTF-8 encoding).
byteLength('ab\u1e09', 'UTF-8')
This expression also returns 5, as the default encoding is UTF-8.
...