Método Node.js buffer toString()

❮ Módulo de búfer


Ejemplo

Muestre el objeto de búfer como una cadena:

var buf = Buffer.from('abc');

console.log(buf.toString());

Definición y uso

El método toString() devuelve el objeto de búfer según la codificación especificada.


Sintaxis

buffer.toString(encoding, start, end);

Valores paramétricos

Parameter Description
encoding Optional. The encoding to use in the return value. Default 'utf8'
start Optional. Where to start. Default 0
end Optional. Where to end. Default at the very end of the buffer

 Detalles técnicos

Valor de retorno: Un amortiguador
Versión de Node.js: 0.1.90

❮ Módulo de búfer