Skip to main content
Module

std/node/buffer.ts>Buffer#write

Deno standard library
Go to Latest
method Buffer.prototype.write
import { Buffer } from "https://deno.land/std@0.113.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