count.substring ViewHelper <vhs:count.substring> 

Counts number of lines in a string.

Usage examples 

<v:count.substring string="{myString}">{haystack}</v:count.substring> (output for example `2`
Copied!
{haystack -> v:count.substring(string: myString)} when used inline
Copied!
<v:count.substring string="{myString}" haystack="{haystack}" />
Copied!
{v:count.substring(string: myString, haystack: haystack)}

Copied!

Arguments 

haystack 

DataType
string
Required
false
Description
String to count substring in, if not provided as tag content

string 

DataType
string
Required
true
Description
Substring to count occurrences of