$SubCnt: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 40: Line 40:
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[http://m204wiki.rocketsoftware.com/images/4/4a/JoclrNew.pdf Janus Open Client]</li>
<li>[[Janus Open Server]]</li>
<li>[http://m204wiki.rocketsoftware.com/images/1/17/JosrvrNew.pdf Janus Open Server]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>

Revision as of 00:32, 13 September 2013

Count occurrences of one string in another

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $SubCnt function.

This function counts the occurrences of one string in another.

Syntax

%count = $SubCnt(string, substring)

Syntax terms

%count The count of occurrences of substring in string.
string An arbitrary string.
substring Another arbitrary string.

Examples

The following statement would set %JUNK to 3:

%JUNK = $SubCnt('ABCDABAB', 'AB')

This statement would set %JUNK to 0:

%JUNK = $SubCnt('WE HAVE WAITED LONG ENOUGH', 'WEHAVE')

And this statement would set %JUNK to 4:

%JUNK = $SubCnt('WE HAVE WAITED LONG ENOUGH', 'E')

Products authorizing $SubCnt