Skip to main content

LINE_BREAK_NEEDLES

Constant LINE_BREAK_NEEDLES 

Source
pub const LINE_BREAK_NEEDLES: &[u8] = b"\n\r";
Expand description

Canonical newline-discovery needles. Used by block-scalar (| / >) line counting, comment-text scanning, and any other “find next line break” hot path.

§Examples

use noyalib::simd::{LINE_BREAK_NEEDLES, SimdScanner};
let s = SimdScanner::new(LINE_BREAK_NEEDLES);
assert_eq!(s.find_any(b"line one\r\nline two"), Some(8));