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.101.0/bytes/mod.ts";

Find first index of binary pattern from source. If not found, then return -1

Parameters

source: Uint8Array

source array

pat: Uint8Array

pattern to find in source array

optional
start = [UNSUPPORTED]

the index to start looking in the source

Returns

number