-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
We may (and I have plans for aarch64 at least) be able to expose a way to iterate over the indexes of the haystack which matches one of our bytes which is more efficient than simply calling .find repeatedly.
We should expose an interface like
pub struct BytesIter<F> { /* impl details */ }
impl Bytes<F> {
pub fn iter(&self, haystack: &[u8]) -> BytesIter<F> { ... }
}
pub struct AsciiCharsIter<F>(BytesIter<F>);
impl AsciiChars<F> {
pub fn iter(&self, haystack: &str) -> AsciiCharsIter<F> { AsciiCharsIter(self.0.iter(haystack.as_bytes()) }
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels