Project

General

Profile

$count » History » Revision 3

Revision 2 (Per Amundsen, 08/12/2015 09:36 AM) → Revision 3/4 (Per Amundsen, 08/12/2015 09:37 AM)

_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* 

 string - The string to search for. 
 substring,substring2,...,substringN - Substrings to search. 

 *Example* 

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

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