CONTAINSI Function

Syntax

Result_Flag as L = CONTAINSI(C String,C Words)

Arguments

String

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

Words

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

Description

Returns TRUE if the string contains all the words (case insensitive).

Discussion

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

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