getOccurenceCount()
Table of Contents
Overview
The getOccurenceCount() function takes string and searchString as arguments. It returns the count of occurrences of searchString in the string.
Note: This function performs a case-sensitive search.
Return Type
- NUMBER
Syntax
<variable> = <string>.getOccurenceCount( <searchString> );
(OR)
<variable> = getOccurenceCount( <string>, <searchString> );
Parameter | Description | Data type |
---|---|---|
<variable> | Variable which will contain the returned count. | NUMBER |
<string> | The string in which the count of searchString will be calculated. | TEXT |
<searchString> |
| TEXT |
Examples
text = "Zoho Creator, an online database service, helps you create custom database applications" ;
count = text.getOccurenceCount("database"); //returns 2
count = text.getOccurenceCount("database"); //returns 2