Struct jetscii::AsciiChars
source · [−]Expand description
Searches a string for a set of ASCII characters. Up to 16 characters may be used.
Implementations
sourceimpl<F> AsciiChars<F> where
F: Fn(u8) -> bool,
impl<F> AsciiChars<F> where
F: Fn(u8) -> bool,
sourcepub fn new(chars: [u8; 16], len: i32, fallback: F) -> Self
pub fn new(chars: [u8; 16], len: i32, fallback: F) -> Self
Manual constructor; prefer using ascii_chars!
instead.
Provide an array of ASCII bytes to search for, the number of valid bytes provided, and a closure to use when the SIMD intrinsics are not available. The closure must search for the same characters as in the array.
Panics
- If you provide a non-ASCII byte.
Auto Trait Implementations
impl<F> RefUnwindSafe for AsciiChars<F> where
F: RefUnwindSafe,
impl<F> Send for AsciiChars<F> where
F: Send,
impl<F> Sync for AsciiChars<F> where
F: Sync,
impl<F> Unpin for AsciiChars<F> where
F: Unpin,
impl<F> UnwindSafe for AsciiChars<F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more