node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / indexRuneString

Function: indexRuneString()

indexRuneString(s, r): number

Defined in: src/strings.ts:543

IndexRune returns the index of the first instance of the Unicode code point r in s, or -1 if r is not present in s.

Parameters

s

string

Input string.

r

number

Unicode code point to find.

Returns

number

Index of first occurrence, or -1.