NXSL:inList

From NetXMS Wiki
Revision as of 14:31, 24 July 2014 by Victor (talk | contribs) (Created page with "__NOTOC__ Check if given value is an element of given list. '''Since:''' 1.2.14 == Syntax == inList(''string'', ''separator'', ''value''); == Parameters == :{| |- | ''s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.


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