listCount function

string listCount(stringList, searchString)

stringList string

searchString string

Returns the number of occurrences of searchString in stringList.

This function returns the number of occurrences of searchString in the stringList. Optional: Leading or trailing * in searchString are used as wildcard.

Note: String lists 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

listCount("rule;your;city;","city")
# result = 1

listCount("city;cityengine;city;", "city")
# result = 2

listCount("rule;your;city;","*y*")
# result = 2

listCount("rule;your;city;","*y")
# result = 1