Xbasic

WORD_EXISTS Function

Syntax

Result_Flag as L = word_exists(C string ,C word [,C delimiter ])

Arguments

Result_Flag

.T. (TRUE) if the Word is found in List.

string

A CR-LF delimited list of words or entries.

word

The word or entry to find in List.

delimiter

Optional. Default = CR-LF.

Description

returns true if word exists in string.

Discussion

The WORD_EXISTS() function determines whether a word exists in a list.

Example

dim s as C
s = <<%a%
bird
cow
chicken
goat
%a%
? word_exists(s, "cow", crlf() )
= .T.

See Also