listClean function

Syntax

  • string listClean(string stringList)

Returns

Returns cleaned stringList.

Description

The listClean function checks if the stringList has the correct ";" at the end. Additionally, empty items (';;') are removed.

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
	listClean(";;;;;my;city;rules;;your;;city;;")
	# result = "my;city;rules;your;city;"
example.2
	listClean(";;cityengine;;;rules")
	# result = "cityengine;rules;"

In this topic