count.bytes ViewHelper <vhs:count.bytes>
Counts bytes (multibyte-safe) in a string.
Usage examples
<v:count.bytes>{myString}</v:count.bytes> (output for example `42`
Copied!
{myString -> v:count.bytes()} when used inline
Copied!
<v:count.bytes string="{myString}" />
Copied!
{v:count.bytes(string: myString)}
Copied!
Arguments
string
- DataType
- string
- Required
- false
- Description
- String to count, if not provided as tag content
encoding
- DataType
- string
- Default
- 'UTF-8'
- Required
- false
- Description
- Character set encoding of string, e.g. UTF-8 or ISO-8859-1