Skip to main content
Module

x/aleph/deps.ts>bytes.indexOf

The Full-stack Framework in Deno.
Very Popular
Go to Latest
function bytes.indexOf
import { bytes } from "https://deno.land/x/aleph@v0.3.0-alpha.2/deps.ts";
const { indexOf } = bytes;

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