Choose where you’d like to start

getOccurenceCount()

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> );
ParameterDescriptionData type
<variable>Variable which will contain the returned count.NUMBER
<string>The string in which the count of searchString will be calculated.TEXT
<searchString>


The searchString whose count will be calculated in the string.

TEXT

Examples

text = "Zoho Creator, an online database service, helps you create custom database applications" ;
count = text.getOccurenceCount("database");               //returns 2

Get Started Now

Execute