Overslaan en naar de inhoud gaan

//ERDDAP/com.cohort.util/ScriptString2/whichSuffix

whichSuffix

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

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

Return

the element number of suffixes which longerString ends with (or -1 if not found)

Parameters

JVM

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