findFirst (utility library)

Syntax

float findFirst(inputString, matchString)

Parameters

Returns

First occurrence (position/index) of matchString in the inputString or -1 if it is not found.

Description

This function returns the index of the first occurrence of the matchString in the inputString.

Note: Indices are 0 - based.

Related

Examples


	findFirst("rule your city with cityengine","city")
	# result = 10
	# "rule your " = 10 characters; then the match string starts
	

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