Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »



Function: byteLength()

Return the length in bytes of a string, optionally using a given encoding.

Syntax

byteLength(string, encoding)

ArgumentTypeDescription
stringStringThe string to be processed.
encodingStringThe character encoding to use.

Examples

byteLength('ab\u1e09', 'UTF-8')

Returns 5 (the length of the string in bytes when using the UTF-8 encoding).


substring("01223236023",6)

This expression also returns 5, as the default encoding is UTF-8.

See Also

  • No labels