length
Measure the length of a stringUsage
z length <mode>
Arguments
mode
Optional. Whether to measure the length in bytes or in unicode characters
Type: enum(bytes, unicode).
Default value:
"bytes".
Examples
# get the length in bytes of "maçã", which equals 6
echo -n "maçã" | z length
# get the length in unicode characters of "maçã", which equals 4
echo -n "maçã" | z length unicode