Documentation · ViewHelper reference

XSD schema file | vhs master

Count / BytesViewHelper

Counts bytes (multibyte-safe) in a string.

Usage examples

<v:count.bytes>{myString}</v:count.bytes> (output for example `42`

{myString -> v:count.bytes()} when used inline

<v:count.bytes string="{myString}" />

{v:count.bytes(string: myString)}

/

  • Tag usage example

    <v:count.bytes string="NULL" encoding="'UTF-8'">
    	<!-- tag content - may be ignored! -->
    </v:count.bytes>
  • Inline usage example

    {v:count.bytes(string: 'NULL', encoding: ''UTF-8'')}

Arguments

Argument Description Type
encoding

Character set encoding of string, e.g. UTF-8 or ISO-8859-1

string
string

String to count, if not provided as tag content

string
Required attribute

Revision history