node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / indexAnyString

Function: indexAnyString()

indexAnyString(s, chars): number

Defined in: src/strings.ts:493

IndexAny returns the index of the first instance of any Unicode code point from chars in s, or -1 if no Unicode code point from chars is present in s.

Parameters

s

string

Input string.

chars

string

String of characters to search for.

Returns

number

Index of first matching character, or -1.