CONTAINSI()

Syntax

Result_Flag as L = CONTAINSI( Search_String as C, Find_Words as C )

Argument

Description

Search_String

The target to examine, a character string containing words separated by space characters.

Find_Words

A character string containing words separated by space characters. The words to find in the target string.

Description

CONTAINSI() returns .T. (TRUE) if all words in the Find_Words string appear at least once in the Search_String ; otherwise, it returns .F. (FALSE). Words found in memo fields will be highlighted.  Find_Words can contain wildcard characters (* and ? ). Case insensitive.

Supported By

Alpha Five Version 5 and Above

Example

containsi("now is the time for all good men","now all is women") -> .F. because the word "women" does not appear in the first string

containsi("now is the time for all good men","now all is ") -> .T.

This example indicates whether "blah" is found in a memo field named MemoField.

containsi("MemoField","blah")

This example indicates whether "blah" is found in a RTF memo field named RtfField.

containsi(rtf_field_to_text("RtfField"),"blah")

See Also

Character Comparison Functions, CONTAINS(), CONTAINSX()