listContains: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Completed the article.)
m (Conversion script moved page listContains to ListContains without leaving a redirect: Converting page title to first-letter uppercase)
(No difference)

Revision as of 22:23, 9 February 2023

listContains() Function

Introduced in version 1.3b42
Returns the number of occurrences of a value in a String List.

Usage

listContains(list, value)
listContains(list, value, delim)

Parameters

  • list - The String List that is checked for occurrences of the value.
  • value - The value to search the String List for occurrences.
  • delim - The delimiter that separates the values in the String List; defaults to ",".

Examples

[r: listContains("a,b,c,a,b,a", "a")]

Returns 3

[h: MyStringList = "1#2#3#4#1#2#3#1#2"]
[r: listContains(MyStringList, "3", "#")]
Returns 2

See Also