listRange

Synopsis

string listRange(string stringList, float index1, float index2)

Returns

Returns items from index1 to index2 (index2 excluded).

This function returns all items in the stringList from index1 to index2 (the index2 item is not included in the resulting list).

Note.1: Indices are 0 - based.

Note.2: 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
	listRange("rule;your;city;with;cityengine;",0,3)
	# result = "rule;your;city;"

example.2
	listRange("texture_1;texture_2;texture_3;texture_4;texture_5;texture_6;",2,3)
	# result = "texture_3"

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