Module

std/bytes/mod.ts>indexOf

Deno standard library
Go to Latest
function indexOf
import { indexOf } from "https://dotland.deno.dev/std@0.131.0/bytes/mod.ts";

Returns the index of the first occurrence of the pattern array in the source array, or -1 if it is not present.

Parameters

source: Uint8Array
pattern: Uint8Array
optional
fromIndex = [UNSUPPORTED]

Returns

number