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`
{haystack -> v:count.substring(string: myString)} when used inline
<v:count.substring string="{myString}" haystack="{haystack}" />
{v:count.substring(string: myString, haystack: haystack)}
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