From WikiChip
Difference between revisions of "mirc/identifiers/$count"
(Created $count identifier - mIRC) |
m |
||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | The '''$count''' identifier allows mIRC to return the total count of a matching substring, or set of substrings to a target string. | + | {{mirc title|$count Identifier}}The '''$count''' identifier allows mIRC to return the total count of a matching substring, or set of substrings to a target string. |
+ | |||
== Synopsis == | == Synopsis == | ||
Line 25: | Line 26: | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|4.6}} | |
− | |||
− | |||
== See Also == | == See Also == | ||
− | * | + | * {{mIRC|$gettok}} |
− | * | + | * {{mIRC|$matchtok}} |
+ | {{mIRC identifier list}} | ||
− | [[Category:mIRC identifiers]] | + | [[Category:mIRC identifiers|count]] |
Latest revision as of 14:47, 20 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
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]
mIRC identifier list