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

std/node/buffer.ts>Buffer#write

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Buffer.prototype.write
import { Buffer } from "https://deno.land/std@0.104.0/node/buffer.ts";

Writes string to buf at offset according to the character encoding in encoding. The length parameter is the number of bytes to write. If buf did not contain enough space to fit the entire string, only part of string will be written. However, partially encoded characters will not be written.

Parameters

string: string
optional
offset = [UNSUPPORTED]
optional
length = [UNSUPPORTED]

Returns

number | undefined