Concatenate an array of byte slices into a single slice.
Array of byte slices to concatenate.
A new byte slice containing all the input slices concatenated.
import { concat } from "@std/bytes/concat";import { assertEquals } from "@std/assert";const a = new Uint8Array([0, 1, 2]);const b = new Uint8Array([3, 4, 5]);assertEquals(concat([a, b]), new Uint8Array([0, 1, 2, 3, 4, 5])); Copy
import { concat } from "@std/bytes/concat";import { assertEquals } from "@std/assert";const a = new Uint8Array([0, 1, 2]);const b = new Uint8Array([3, 4, 5]);assertEquals(concat([a, b]), new Uint8Array([0, 1, 2, 3, 4, 5]));
Concatenate an array of byte slices into a single slice.