node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / indexFuncString

Function: indexFuncString()

indexFuncString(s, f): number

Defined in: src/strings.ts:526

IndexFunc returns the index into s of the first Unicode code point satisfying f(c), or -1 if none do.

Parameters

s

string

Input string.

f

(_ch) => boolean

Predicate function.

Returns

number

Index of first matching character, or -1.