summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-05-06 13:42:55 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-05-06 13:42:55 -0700
commit00aee736922b1fc1fae3953f08d24ced95b8a65f (patch)
tree32342fccb40f8ceebb573af448e9c25912c5c394 /doc
parent5e1b7cadb48aaf47978b7661a5ce58b0c4d21d27 (diff)
downloadandroid-node-v8-00aee736922b1fc1fae3953f08d24ced95b8a65f.tar.gz
android-node-v8-00aee736922b1fc1fae3953f08d24ced95b8a65f.tar.bz2
android-node-v8-00aee736922b1fc1fae3953f08d24ced95b8a65f.zip
Add docs for buffer.fill()
Diffstat (limited to 'doc')
-rw-r--r--doc/api/buffers.markdown10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/api/buffers.markdown b/doc/api/buffers.markdown
index 68317aff03..d3f88b79c2 100644
--- a/doc/api/buffers.markdown
+++ b/doc/api/buffers.markdown
@@ -363,3 +363,13 @@ format. Note, `value` must be a valid 16 bit signed integer.
Works as `buffer.writeUInt832, except value is written out as a two's complement
signed integer into `buffer`.
+
+
+### buffer.fill(value, offset=0, length=-1)
+
+Fills the buffer with the specified value. If the offset and length are not
+given it will fill the entire buffer.
+
+ var b = new Buffer(50);
+ b.fill("h");
+