Xbasic

OCCURS_WORDS Function

Syntax

Count as N = occurs_words(C word ,C string [,C delimiter ])

Arguments

word

The word to find. Character

string

A CR-LF delimited list of words to examine. Character

delimiter

Character

Description

Returns the number of times word occurs in string.

Discussion

OCCURS_WORDS() returns the number of times word appears in string.

Example

dim cs as C
cs = form_objects_get("Category_Form")
cs   ->   SUBCATEGORY
SUBCATEGORY_LBL
CATEGORY
CATEGORY_LBL
ID
ID_LBL
Tables
Tables:CATEGORY
num = occurs_words("CATEGORY", cs, crlf() )
num -> 1.000000

See Also