$WBCSTR - count string appearances

Availability
$WBCSTR is available for use with all WBSP commands.

Syntax
$WBCSTR{str1|str2|casesensitive}
$WBCSTR[str1|str2|casesensitive]

Parameters
str1 - string to be searched
str2 - string to search for
casesensitive - optional parameter  - if set to true (T,ON,1) WhizBase will perform case sensitive search (so "A" will not match "a")
 

Returns
A number (count) of appearances (instances) of str2 inside str1.

Example

<html>
    <body>
    Word whizbase in whizbase@whizbase.com repeats $WBCSTR[whizbase@whizbase.com|whizbase] times.<br>
    Word WhizBase in whizbase@whizbase.com repeats $WBCSTR[whizbase@whizbase.com|WhizBase|T] times.
    </body>
</html>
 

Result:

Word whizbase in whizbase@whizbase.com repeats 2 times.
Word WhizBase in whizbase@whizbase.com repeats 0 times.