Determines whether a character expression matches another character expression.
Syntax
LIKEC(cExpression1, cExpression2)
Returns
Logical
Arguments
cExpression1
Specifies the character expression that LIKEC( ) compares with cExpression2. cExpression1 can contain wild cards such as * and ?. A question mark (?) matches any single character in cExpression2 and an asterisk (*) matches any number of characters. You can mix any number of wild cards in any combination in cExpression1.
cExpression2
Specifies the character expression LIKEC( ) compares with cExpression1. cExpression2 must match cExpression1 character for character in order for LIKE( ) to return true (.T.).
Remarks
LIKEC( ) is designed for expressions containing double-byte characters. If the expression contains only single-byte characters, LIKEC( ) is equivalent to LIKE( ).
LIKEC( ) determines if a character expression matches another character expression. LIKEC( ) returns true (.T.) if cExpression1 matches cExpression2; otherwise, it returns false (.F.).
SET COMPATIBLE determines how LIKEC( ) compares blanks in cExpression1 and cExpression2. If SET COMPATIBLE is set to ON or DB4, all trailing blanks are removed from cExpression1 and cExpression2 before they are compared. If SET COMPATIBLE is set to OFF or FOXPLUS, any trailing blanks in cExpression1 and cExpression2 are used in the comparison.
This function is useful for manipulating double-byte character sets for languages such as Hiragana and Katakana.