OCCURS Function

Returns the number of times one string occurs within another string

Category: String
Returned data type: Integer

Syntax

OCCURS(string1, string2)

Required Arguments

string1

specifies the string to search.

string2

represents the substring to count.

Details

The OCCURS function returns the number of times that a substring occurs within a string.

Example

string s

integer o

s="one:two:three"

o=occurs(s,":")

//the value o should contain 2 at this point