Home  >  Article  >  Web Front-end  >  node.js中的buffer.length方法使用说明_node.js

node.js中的buffer.length方法使用说明_node.js

WBOY
WBOYOriginal
2016-05-16 16:27:181724browse

方法说明:

该方法将返回buffer对象的长度。

语法:

复制代码 代码如下:

buffer.length

接收参数:

例子:

复制代码 代码如下:

buf = new Buffer(1234);
console.log(buf.length);
buf.write("some string", 0, "ascii");
console.log(buf.length);
// 1234
// 1234
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn