Difference between revisions of "NXSL:inList"
Jump to navigation
Jump to search
Tomas Kirnak (talk | contribs) |
m (Text replacement - "^" to "{{deprecated}}") |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | {{deprecated}}__NOTOC__ | ||
Check if given value is an element of given list. | Check if given value is an element of given list. | ||
Line 12: | Line 12: | ||
== Parameters == | == Parameters == | ||
:{| | :{| class="wikitable" | ||
|- | |- | ||
| ''string'' || String containing list of elements. | | ''string'' || String containing list of elements. |
Latest revision as of 16:13, 13 September 2022
This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide) |
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