Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
doc: fix typo in buffer documentation
Browse files Browse the repository at this point in the history
Fixes #3253.
  • Loading branch information
Shigeki Ohtsu authored and koichik committed May 11, 2012
1 parent 52f0c37 commit cc8cfb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/buffer.markdown
Expand Up @@ -66,7 +66,7 @@ Allocates a new buffer containing the given `str`.

* `string` String - data to be written to buffer
* `offset` Number, Optional, Default: 0
* `length` Number, Optional
* `length` Number, Optional, Default: `buffer.length - offset`
* `encoding` String, Optional, Default: 'utf8'

Writes `string` to the buffer at `offset` using the given encoding.
Expand All @@ -89,7 +89,7 @@ next time `buf.write()` is called.

* `encoding` String, Optional, Default: 'utf8'
* `start` Number, Optional, Default: 0
* `end` Number, Optional
* `end` Number, Optional, Default: `buffer.length`

Decodes and returns a string from buffer data encoded with `encoding`
(defaults to `'utf8'`) beginning at `start` (defaults to `0`) and ending at
Expand Down Expand Up @@ -167,7 +167,7 @@ buffer object. It does not change when the contents of the buffer are changed.
* `targetBuffer` Buffer object - Buffer to copy into
* `targetStart` Number, Optional, Default: 0
* `sourceStart` Number, Optional, Default: 0
* `sourceEnd` Number, Optional, Default: 0
* `sourceEnd` Number, Optional, Default: `buffer.length`

Does copy between buffers. The source and target regions can be overlapped.
`targetStart` and `sourceStart` default to `0`.
Expand All @@ -193,7 +193,7 @@ into `buf2`, starting at the 8th byte in `buf2`.
### buf.slice([start], [end])

* `start` Number, Optional, Default: 0
* `end` Number, Optional, Default: 0
* `end` Number, Optional, Default: `buffer.length`

Returns a new buffer which references the same memory as the old, but offset
and cropped by the `start` (defaults to `0`) and `end` (defaults to
Expand Down

0 comments on commit cc8cfb1

Please sign in to comment.