JavaScript Editor js editor     Web development 



Main Page

Returns the number of times a character expression occurs within another character expression.

OCCURS(cSearchExpression, cExpressionSearched)

Parameters

cSearchExpression


Specifies a character expression that OCCURS(В ) searches for within cExpressionSearched.
cExpressionSearched


Specifies the character expression OCCURS(В ) searches for cSearchExpression.

Return Value

Numeric

Remarks

OCCURS(В ) returns 0 (zero) if cSearchExpression isn't found within cExpressionSearched.

Example

В Copy Code
STORE 'abracadabra' TO gcstring
CLEAR
? OCCURS('a', gcstring)  && Displays 5
? OCCURS('b', gcstring)  && Displays 2
? OCCURS('c', gcstring)  && Displays 1
? OCCURS('e', gcstring)  && Displays 0

See Also



JavaScript Editor js editor     Web development