Contains
(7.2)
Returns True or False, based on whether the first specified string contains the second specified string.
Usage
@Contains(<Substring>, <WithinString>, [<IgnoreCase>], [<HonorWildcards>])
Argument Name |
Description |
HonorWildcards |
Optional (default is FALSE). Whether to honor wildcards (* or ?). |
IgnoreCase |
Optional (default is TRUE). Whether to ignore case. |
Substring |
The substring to find in the WithinString. |
WithinString |
The string to search for the Substring. |
Examples
@Contains
function example
|
A |
B |
C |
D |
E |
F |
1 |
Search |
within |
ignore case |
wildcards |
Eval |
Comments |
2 |
|
|
|
|
|
3 |
Spreadsheet |
Dodeca |
|
|
|
Should be FALSE because Dodeca does not contain text "Spreadsheet" |
4 |
deca |
Dodeca |
|
|
|
5 |
Deca |
Dodeca |
TRUE |
|
|
6 |
|
|
|
|
|
7 |
Deca |
Dodeca |
FALSE |
|
|
8 |
Deca |
Dodeca |
TRUE |
TRUE |
|
9 |
Dod |
Dodeca |
FALSE |
TRUE |
|
10 |
Dod??? |
Dodeca |
FALSE |
TRUE |
|
11 |
|
|
|
|
|
All blank input evaluates to TRUE because XYZ |
12 |
|
|
|
|
|
13 |
|
|
|
|
|
Procedure |
|
|
Method |
Overload |
ErrorHandlingMode |
|
|
|
Argument |
Value |
Comment |
OnAfterBuild |
|
|
SetEntry
|
Text
|
|
|
|
|
Address |
ContainsRange |
|
|
|
CellByCell |
True |
|
|
|
Entry |
=@Contains(@ValueText(A@CRow()), @ValueText(B@CRow()), @ValueText(C@CRow()), @ValueText(D@CRow())) |
|
|
A |
B |
C |
D |
E |
F |
1 |
Search |
within |
ignore case |
wildcards |
Eval |
Comments |
2 |
|
|
|
|
TRUE |
3 |
Spreadsheet |
Dodeca |
|
|
FALSE |
Should be FALSE because Dodeca does not contain text "Spreadsheet" |
4 |
deca |
Dodeca |
|
|
TRUE |
5 |
Deca |
Dodeca |
TRUE |
|
TRUE |
6 |
|
|
|
|
TRUE |
7 |
Deca |
Dodeca |
FALSE |
|
FALSE |
8 |
Deca |
Dodeca |
TRUE |
TRUE |
TRUE |
9 |
Dod |
Dodeca |
FALSE |
TRUE |
TRUE |
10 |
Dod??? |
Dodeca |
FALSE |
TRUE |
FALSE |
11 |
|
|
|
|
TRUE |
All blank input evaluates to TRUE |
12 |
|
|
|
|
TRUE |
13 |
|
|
|
|
TRUE |