Skip to main content
Module

std/bytes/mod.ts>indexOf

Deno standard library
Go to Latest
function indexOf
import { indexOf } from "https://deno.land/std@0.120.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