strip_trailing_eol

Function strip_trailing_eol 

Source
pub(crate) fn strip_trailing_eol(bytes: &[u8]) -> Option<&[u8]>
Expand description

Strip a newline (eol) from the end of the provided byte slice.

The newline is considered mandatory and a decoding error will occur if it is not present.

From RFC 7468 Section 3:

lines are divided with CRLF, CR, or LF.