Project

General

Profile

Actions

Added in 1.8.10

$count(string,substring,substring2,...,substringN)

Returns the number of times substring occurs in string.

$count is case-insensitive, see $countcs for case-sensitive version.

Parameters

Parameter Description
string The string to search for.
substring,substring2,...,substringN Substrings to search.

Example

; Count number of times 'el' appears in 'hello'.
//echo -ag $count(hello,el)

; Count number of times 'l' appears in 'hello'.
//echo -ag $count(hello,l)

Updated by Per Amundsen over 1 year ago · 4 revisions

Also available in: PDF HTML TXT