Passer au contenu principal

//ERDDAP/com.cohort.util/ScriptString2/lineStartsWith

lineStartsWith

[JVM]
open fun lineStartsWith(ar: Array<Any>, s: String): Int

This finds the first element in Object[] (starting at element 0) where the ar[i].toString value starts with s.

Return

the element number of ar which starts with s (or -1 if not found)

Parameters

JVM

arthe array of objects
sthe String to be found

[JVM]
open fun lineStartsWith(ar: Array<Any>, s: String, startAt: Int): Int

This finds the first element in Object[] (starting at element startAt) where the ar[i].toString value starts with s.

Return

the element number of ar which starts with s (or -1 if not found)

Parameters

JVM

arthe array of objects
sthe String to be found
startAtthe first element of ar to be checked. If startAt <0, this starts with startAt = 0.