Xbasic
*WORD Function
Syntax
Result_Flag as L = *WORD(C text,C word)
Arguments
- Result_Flag
TRUE (.T.) if the word was found; otherwise FALSE (.F.).
- text
A non-null character string.
- word
A character string.
Description
Find a word (word of words) in text - if found, return true, else return false.
Discussion
*WORD() returns .T. (TRUE) if Find_String is a whole word in Search_In_String. A word is any sequence of characters separated on either end by spaces, punctuation marks, or the beginning or end of the field.
Example
*word(SENTENCE, "and") .OR. *WORD(SENTENCE, "or") -> TRUE, if the SENTENCE field contains the word "and" or the word "or"
Limitations
The Find_String argument is case sensitive.
See Also