Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/io/writers.ts>StringWriter

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class StringWriter
implements Writer, WriterSync
import { StringWriter } from "https://deno.land/std@0.95.0/io/writers.ts";

Writer utility for buffering string chunks

Constructors

new
StringWriter(base?: string)

Properties

private
byteLength: number
private
cache: string | undefined
private
chunks: Uint8Array[]

Methods

toString(): string
write(p: Uint8Array): Promise<number>
writeSync(p: Uint8Array): number