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

docs(bytes): update API doc of lastIndexOfNeedle #4665

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bytes/last_index_of_needle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @param source Source array to check.
* @param needle Needle array to check for.
* @param start Start index in the source array to begin the search. Defaults to
* the end of the array.
* `source.length - 1`.
* @returns Index of the last occurrence of the needle array in the source
* array, or -1 if it is not present.
*
Expand All @@ -34,7 +34,7 @@
* const needle = new Uint8Array([1, 2]);
*
* lastIndexOfNeedle(source, needle, 2); // 1
* lastIndexOfNeedle(source, needle, 6); // 3
* lastIndexOfNeedle(source, needle, 6); // 5
* ```
* Defining a start index will begin the search at the specified index in the
* source array.
Expand Down