findFirst

open fun findFirst(predicate: Predicate<TextElement>): Int(source)

Finds the first index where the predicate matches, searching forward from index 0.

Return

the first matching index, or -1 if no match found

Parameters

predicate

the condition to test

Throws

if predicate is null