node-lib

@wtasnorg/node-lib


@wtasnorg/node-lib / indexByteString

Function: indexByteString()

indexByteString(s, c): number

Defined in: src/strings.ts:511

IndexByte returns the index of the first instance of the byte b in s, or -1 if b is not present in s.

Parameters

s

string

Input string.

c

number

Byte value (0–255) to search for.

Returns

number

Index of first occurrence, or -1.