docs: fix using legacy api in the buffer doc
authorYoshihiro Kikuchi <yknetg@gmail.com>
Mon, 12 Mar 2012 08:27:44 +0000 (17:27 +0900)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 12 Mar 2012 14:04:53 +0000 (15:04 +0100)
doc/api/buffer.markdown

index 0186642..2447869 100644 (file)
@@ -156,7 +156,7 @@ buffer object.  It does not change when the contents of the buffer are changed.
     buf = new Buffer(1234);
 
     console.log(buf.length);
-    buf.write("some string", "ascii", 0);
+    buf.write("some string", 0, "ascii");
     console.log(buf.length);
 
     // 1234