Xbasic

WORD_EXISTS_C Function

Syntax

result as L = word_exists_C(C string ,C word ,C delimiter)

Arguments

stringCharacter

A CR-LF delimited list of words or entries.

wordCharacter

The word or entry to find in List.

delimiterCharacter

Defines the character delimiter between words.

Returns

resultLogical

Returns .T. if the word is found in list. Otherwise, returns .F.

Description

Does a case-sensitive search for a word in a list of words.

Discussion

The WORD_EXISTS_C() function determines whether a word exists in a string using a case-sensitive comparison.

Example

dim s as C

s = <<%a%
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
%a%

? word_exists_c(s, "Friday", crlf())
= .T.

? word_exists_c(s, "monday", crlf())
= .F.

See Also