-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: improve buf.lastIndexOf() text #19904
Conversation
@addaleax What do you think of this wording for the |
doc/api/buffer.md
Outdated
**Default:** `'utf8'`. | ||
* `encoding` {string} If `value` is a string, this is the encoding used to | ||
determine the binary representation of the string that will be searched for in | ||
`buf`. **Default:** `'utf8'`. | ||
* Returns: {integer} The index of the first occurrence of `value` in `buf` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: `buf` or
-> `buf`, or
— as in the lastIndexOf()
description?
doc/api/buffer.md
Outdated
|
||
Identical to [`buf.indexOf()`], except `buf` is searched from back to front | ||
instead of front to back. | ||
Identical to [`buf.indexOf()`], except `buf` the last occurrence of `value` is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?buf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With nits)
Improve description of `encoding` option. (This change is also applied to `buf.indexOf()`.) Improve punctuation. Wrap at 80 characters.
@nodejs/documentation @nodejs/buffer |
Improve description of `encoding` option. (This change is also applied to `buf.indexOf()`.) Improve punctuation. Wrap at 80 characters. PR-URL: nodejs#19904 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Landed in cf34c2c |
Improve description of `encoding` option. (This change is also applied to `buf.indexOf()`.) Improve punctuation. Wrap at 80 characters. PR-URL: #19904 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Improve description of `encoding` option. (This change is also applied to `buf.indexOf()`.) Improve punctuation. Wrap at 80 characters. PR-URL: #19904 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Improve description of `encoding` option. (This change is also applied to `buf.indexOf()`.) Improve punctuation. Wrap at 80 characters. PR-URL: nodejs#19904 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Improve description of `encoding` option. (This change is also applied to `buf.indexOf()`.) Improve punctuation. Wrap at 80 characters. PR-URL: #19904 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Improve description of
encoding
option. (This change is also appliedto
buf.indexOf()
.) Improve punctuation. Wrap at 80 characters.Checklist