Difference between revisions of "NXSL:inList"

From NetXMS Wiki
Jump to navigation Jump to search
Line 24: Line 24:
== Return Value ==
== Return Value ==


'''TRUE''' if given value is an element of given list.
'''TRUE''' if given value is an element of given list, '''FALSE''' otherwise.





Revision as of 10:27, 22 October 2014

Check if given value is an element of given list.

Since: 1.2.14


Syntax

inList(string, separator, value);


Parameters

string String containing list of elements.
separator Element separator (can consist of multiple characters).
value Value to check.


Return Value

TRUE if given value is an element of given list, FALSE otherwise.


Examples

 inList("a,b,c", ",", "a");                              // TRUE
 inList("alpha::beta,gamma::delta", "::", "beta");       // FALSE
 inList("alpha::beta,gamma::delta", "::", "beta,gamma"); // TRUE
 inList("alpha::beta,gamma::delta", ",", "alpha::beta"); // TRUE