|
@ -55,6 +55,10 @@ Example: write a utf8 string into a buffer, then print it |
|
|
len = buf.write('\u00bd + \u00bc = \u00be', 0); |
|
|
len = buf.write('\u00bd + \u00bc = \u00be', 0); |
|
|
console.log(len + " bytes: " + buf.toString('utf8', 0, len)); |
|
|
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) |
|
|
### buffer.toString(encoding, start=0, end=buffer.length) |
|
|
|
|
|
|
|
|