Xbasic

WORD_OCCURS Function

Syntax

Count as N = word_occurs(C list ,C word [,C delimiter ])

Arguments

list

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

word

The word to find. Character

delimiter

A character string that separates words. The default is the CR-LF character sequence.

Description

Returns number of occurences of word in a list of words. Default delimiter is CRLF

Discussion

WORD_OCCURS() returns the number of times Word appears in list. WORD_OCCURS() is not case sensitive.

Example

word_occurs(cstates() , "Maryland") ->   1
word_occurs("abc,def,abc,ghi", "abc", ",") ->   2

See Also