Complementary ByteSlice functions addition - find_not_byte / rfind_not_byte
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
i've been working with bstr recently and noticed that the ByteSlice has some functions missing that would help to achieve API symmetry and reduce the potential overhead of unnecessary precondition checking.
find_byte/rfind_byte functions that utilize memchr/memrchr internally are available, however, their inverted cousins (find_not_byte/rfind_not_byte) are missing.
Currently it is necessary to use find_not_byteset/rfind_not_byteset that dispatch to scalar::inv_memchr/inv_memrchr if byteset.len() is equal to 1.
Best regards
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing ByteSlice find_byte/rfind_byte functions and the find_not_byteset/rfind_not_byteset paths described in the issue. Add the complementary find_not_byte and rfind_not_byte APIs with matching behavior and verify that single-byte searches no longer require byteset dispatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100