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

//ERDDAP/com.cohort.util/ScriptString2/binaryFindClosest

binaryFindClosest

[JVM]
open fun binaryFindClosest(sar: Array<String>, s: String): Int

Find the closest element to s in an ascending sorted array.

Return

the index of the element closest to s. If s is null, this returns -1.

Parameters

JVM

saran ascending sorted String[]. It the array has duplicates and s equals one of them, it isn't specified which duplicate's index will be returned.
s