MongoosePeople. Places. Questionable inventions.

All help topics · Link to this topic

Showing help on 'is_member()'

Syntax: is_member (ANY value, LIST list) => INT

Returns true if there is an element of <list> that is completely indistinguishable from <value>. This is much the same operation as "<value> in <list>" except that, unlike `in', the `is_member()' function does not treat upper- and lower-case characters in strings as equal.

Raises E_ARGS if two values are given or if more than two values are given. Raises E_TYPE if the second argument is not a list. Otherwise returns the index of <value> in <list>, or 0 if it's not in there.

is_member(3, {3, 10, 11}) => 1
is_member("a", {"A", "B", "C"}) => 0
is_member("XyZ", {"XYZ", "xyz", "XyZ"}) => 3