Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/bytes/mod.ts>startsWith

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function startsWith
import { startsWith } from "https://deno.land/std@0.110.0/bytes/mod.ts";

Check whether binary array starts with prefix.

Parameters

source: Uint8Array

source array

prefix: Uint8Array

prefix array to check in source

Returns

boolean