Hi,
The function IS_ELEMENT_OF_STR_N does case-insensitive string
matching:
yes? show function is_element*
IS_ELEMENT_OF(VAR,VALUES)
Returns 1 if first argument contains any of the
values in argument 2, else 0
VAR: data to test
VALUES: values to search for
IS_ELEMENT_OF_STR(VAR,VALUES)
Returns 1 if first argument contains any of the
values in 2nd argument (case sensitive), else 0
VAR: string (STRING)
VALUES: strings to search (STRING)
IS_ELEMENT_OF_STR_N(VAR,VALUES)
Returns 1 if 1st arg contains any of the values in
2nd arg, 2 if case-insensitve match, else 0
VAR: string (STRING)
VALUES: strings to search (STRING)
yes? list/nohead IS_ELEMENT_OF_STR ({"friend"}, {"Hello",
"Friend"})
0.0000
yes? list/nohead IS_ELEMENT_OF_STR_N ({"friend"},
{"Hello", "Friend"})
2.000
yes? list/nohead IS_ELEMENT_OF_STR_N ({"Friend"},
{"Hello", "Friend"})
1.000
I am working on revising the documentation to include all of the
functions in Ferret, and to make the documentation of functions
easier to navigate. SHOW FUNCTION from the Ferret command line
always shows valid and up-to-date information; it is querying the
definitions in the code itself.
On 6/16/2017 5:44 AM, Akshay Hegde
wrote:
And other thing which you asked, as far as I know
there is no "CASE / SWITCH" statement in Ferret, you have to
manage with IF-ELIF-ELSE clause only, if you have PyFerret then
inside external function you can use switch statement.