listRetainAll function

Syntax

  • string listRetainAll(string stringList, string item)

Returns

Retains only occurrences of item in stringList.

Description

The listRetainAll function retains only occurrences of item in stringList. Optional: leading or trailing * in item are used as wildcard.

Note:

Stringlists are a series of strings stored inside one string. The elements are separated by a semicolon (";"). Each item must be followed by a semicolon, also the last one! The data type is "string", thus it is not an array as used in other scripting languages.

Related

Examples

example.1
    listRetainAll("rule;your;designs;and;your;cities;","*s")
    # result = "designs;cities;"

example.2
    listRetainAll("floor;floor_1;floor_2;", "*_*")
    # result = "floor_1;floor_2;"

In this topic