Like()
This function compares a string to a template string that may contain wildcards.
Usage |
lMatch = LIKE( cWildcardString, cCompareString ) |
Parameter |
Value |
Meaning |
cWildcardString |
Character |
The template string. It may contain the wildcards "*" (0 or more characters) and "?" (one character). |
cCompareString |
Character |
The string to check against the template. |
lMatch |
.T. |
cCompareString matches the form of cWildcardString. |
.F. |
cCompareString does not fit the form of cWildcardString. |
Example |
? LIKE("T*", "Tamar") && Returns .T. ? LIKE("T*", "Ted") && Returns .T. ? LIKE("T*", "Cherry Tomato") && Returns .F. ? LIKE("*.DBF", UPPER(cFileName)) && Is it a table name? |
See Also |
Difference(), LikeC(), Select-SQL, Set Compatible, Set Exact, Soundex() |