listFirst function

Syntax

  • string listFirst(string stringList)

Returns

Returns first item in stringList.

Description

The listFirst function returns the first item in the stringList.

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
	listFirst("rule;your;city;")
	# result = "rule"

example.2
	listFirst(fileSearch("/myProject/assets/image*.jpg"))
	# result = the image from that directory with the lowest index

In this topic