মূল বিষয়বস্তু উপেক্ষা করুন

//ERDDAP/com.cohort.util/ScriptString2/whichPrefix

whichPrefix

[JVM]
open fun whichPrefix(prefixes: Array<String>, longerString: String, startAt: Int): Int

This finds the first element in prefixes (starting at element startAt) where the longerString starts with prefixes[i].

Return

the element number of prefixes which longerString starts with (or -1 if not found)

Parameters

JVM

prefixesthe array of prefixes
longerStringthe String that might start with one of the prefixes
startAtthe first element of ar to be checked. If startAt <0, this starts with startAt = 0.