listFirst

Syntax

string listFirst(stringList)

Parameters

Returns

Returns first item in stringList.

Description

This function returns the first item in the stringList.

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

listFirst("rule;your;city;")
# result = "rule"

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

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