From WikiChip
$count Identifier - mIRC
< mirc‎ | identifiers

The $count identifier allows mIRC to return the total count of a matching substring, or set of substrings to a target string.


Synopsis[edit]

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

Parameters[edit]

string The target string to match
substring The substring to match within the target
substring2,... The second substring to match, and beyond

Example[edit]

The example string is going to be: My string to match

Echo the matching substring count for str:

//echo -a Result: $count(My string to match,str)
Result: 1

Echo the matching substring count for str and m:

//echo -a Result: $count(My string to match,str,m)
Result: 3

The above returns 3 because str is matched to string once, and m is matched to My and match; therefore, the total matches is 3.

Compatibility[edit]

Added: mIRC v4.6
Added on: 07 Sep 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]

[Expand]
v · d · e mIRC identifier list