listCount

Syntax

string listCount(stringList, searchString)

Parameters

Returns

Returns number of occurrences of searchString in stringList.

Description

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

Copyright ©2008-2023 Esri R&D Center Zurich. All rights reserved.