Function imara_diff::sources::byte_lines_with_terminator
source · [−]pub fn byte_lines_with_terminator(data: &[u8]) -> ByteLines<'_, true>ⓘNotable traits for ByteLines<'a, INCLUDE_LINE_TERMINATOR>impl<'a, const INCLUDE_LINE_TERMINATOR: bool> Iterator for ByteLines<'a, INCLUDE_LINE_TERMINATOR> type Item = &'a [u8];
Expand description
Returns a TokenSource
that uses
the lines in data
as Tokens. A lines is a continous subslice of
data
which does not contain \n
(or \r\n
).
The newline seperator (\r\n
or \n
) is not included in the emitted tokens.
This means that changing the newline seperator from \r\n
to \n
(or omitting it fully on the last line) is not detected by diff
.