pub struct Lines { /* private fields */ }
Expand description
Line counter for UTF-8 encoded byte slices
use wz_core::Counter;
use wz_utf8::Lines;
let counter = Lines::with_linebreak(b'\n');
Implementations§
Source§impl Lines
impl Lines
Sourcepub fn with_linebreak(line_break: u8) -> Self
pub fn with_linebreak(line_break: u8) -> Self
Creates a new Lines counter that counts line_break
bytes
Sourcepub fn carriage_return() -> Self
pub fn carriage_return() -> Self
Creates a new Lines counter that counts \r
bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lines
impl RefUnwindSafe for Lines
impl Send for Lines
impl Sync for Lines
impl Unpin for Lines
impl UnwindSafe for Lines
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more