std@0.144.0/bytes

Deno standard library
GitHub Stars
2196
Go to latest
import * as mod from "https://deno.land/std@0.144.0/bytes/mod.ts";

Provides helper functions to manipulate Uint8Array byte slices that are not included on the Uint8Array prototype.

Functions

concat

Concatenate the given arrays into a new Uint8Array.

copy

Copy bytes from the src array to the dst array. Returns the number of bytes copied.

endsWith

Returns true if the suffix array appears at the end of the source array, false otherwise.

equals

Check whether binary arrays are equal to each other.

includesNeedle

Returns true if the source array contains the needle array, false otherwise.

indexOfNeedle

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

lastIndexOfNeedle

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

repeat

Returns a new Uint8Array composed of count repetitions of the source array.

startsWith

Returns true if the prefix array appears at the start of the source array, false otherwise.

Bytes

The bytes module provides helper functions to manipulate Uint8Array byte slices that are not included on the Uint8Array prototype.

View the documentation for details information.