Last modified: Mon, 06/19/2017 - 10:52
IS_ELEMENT_OF, IS_ELEMENT_OF_STR, IS_ELEMENT_OF_STR_N
IS_ELEMENT_OF(A, B) returns 1 if any element of numeric argument B matches any element of numeric argument A, and 0 if there is no match
IS_ELEMENT_OF_STR(A,B) works on string arguments A and B
IS_ELEMENT_OF_STR_N(A,B) works on string arguments A and B, and does case insensitive matching. It returns1 if 1st arg contains any of the values in 2nd arg, 2 if there is a case-insensitve match, else 0.
Arguments: |
A |
variable to search |
B |
variable to match |
|
Result Axes: |
X |
Abstract, 1 element long |
Y |
Normal |
|
Z |
Normal |
|
T |
Normal |
Example:
yes? list/nohead IS_ELEMENT_OF ({44,55,66}, {55}) 1.00
IS_ELEMENT_OF_STR is case sensitive
yes? list/nohead IS_ELEMENT_OF_STR ({"HELLO", "hello", "Friend"}, {"Friend", "bye"}) 1.00 yes? list/nohead IS_ELEMENT_OF_STR ({"HELLO", "hello", "Friend"}, {"friend", "heLLo"}) 0.00
IS_ELEMENT_OF_STR_N(VAR,VALUES) returns 2 if there is a case-insensitive match.
yes? list/nohead IS_ELEMENT_OF_STR_N ({"friend"}, {"HELLO", "hello", "Friend"}) 2.000 yes? list/nohead IS_ELEMENT_OF_STR_N ({"Friend"}, {"HELLO", "hello", "Friend"}) 1.000