getOccurenceCount

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

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com