Browse Source

Add docs about Buffer._charsWritten

Fixes GH-907.
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
9b3b37e498
  1. 4
      doc/api/buffers.markdown

4
doc/api/buffers.markdown

@ -55,6 +55,10 @@ Example: write a utf8 string into a buffer, then print it
len = buf.write('\u00bd + \u00bc = \u00be', 0);
console.log(len + " bytes: " + buf.toString('utf8', 0, len));
The number of characters written (which may be different than the number of
bytes written) is set in `Buffer._charsWritten` and will be overwritten the
next time `buf.write()` is called.
### buffer.toString(encoding, start=0, end=buffer.length)

Loading…
Cancel
Save