メインコンテンツへスキップ

//ERDDAP/com.cohort.util/ScriptString2/findPrefix

findPrefix

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

This is like whichPrefix, but returns the found prefix (or null).

Return​

the prefixes[i] which longerString starts with (or null 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.