Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Apr 9, 2018

Improve description of encoding option. (This change is also applied
to buf.indexOf().) Improve punctuation. Wrap at 80 characters.

Checklist

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Apr 9, 2018
@Trott
Copy link
Member Author

Trott commented Apr 9, 2018

@addaleax What do you think of this wording for the encoding option?

@Trott
Copy link
Member Author

Trott commented Apr 9, 2018

**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
Copy link
Contributor

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?


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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buf ?

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt left a 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.
@Trott
Copy link
Member Author

Trott commented Apr 10, 2018

@vsemozhetbyt vsemozhetbyt added the fast-track PRs that do not need to wait for 48 hours to land. label Apr 10, 2018
@Trott
Copy link
Member Author

Trott commented Apr 11, 2018

@nodejs/documentation @nodejs/buffer

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 11, 2018
Trott added a commit to Trott/io.js that referenced this pull request Apr 12, 2018
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 <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@Trott
Copy link
Member Author

Trott commented Apr 12, 2018

Landed in cf34c2c

@Trott Trott closed this Apr 12, 2018
targos pushed a commit that referenced this pull request Apr 12, 2018
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 <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
jasnell pushed a commit that referenced this pull request Apr 16, 2018
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 <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request May 1, 2018
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 <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 17, 2018
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 <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Aug 17, 2018
@Trott Trott deleted the lastindexof branch January 13, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants