Project

General

Profile

Actions

Added in 1.8.10

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

Returns the number of times substring occurs in string.

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

Parameters

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

Example

; Count number of times 'A' appears in 'Aaa'.
//echo -ag $countcs(Aaa,A)

; Count number of times 'a' appears in 'Aaa'.
//echo -ag $countcs(Aaa,a)

Updated by Per Amundsen over 1 year ago · 5 revisions

Also available in: PDF HTML TXT