MCPcopy Create free account
hub / github.com/denoland/std / repeat

Function repeat

io/buffer_test.ts:77–82  ·  view source on GitHub ↗
(c: string, bytes: number)

Source from the content-addressed store, hash-verified

75}
76
77function repeat(c: string, bytes: number): Uint8Array {
78 assertEquals(c.length, 1);
79 const ui8 = new Uint8Array(bytes);
80 ui8.fill(c.charCodeAt(0));
81 return ui8;
82}
83
84Deno.test("Buffer", () => {
85 init();

Callers 2

buffer_test.tsFile · 0.70
fnFunction · 0.70

Calls 1

assertEqualsFunction · 0.90

Tested by

no test coverage detected