Get the length of the separator in bytes.
(&self)
| 93 | |
| 94 | /// Get the length of the separator in bytes. |
| 95 | pub fn len(&self) -> usize { |
| 96 | match self { |
| 97 | Separator::Newline => 1, |
| 98 | Separator::CrLf => 2, |
| 99 | Separator::Byte(_) => 1, |
| 100 | Separator::Custom(v) => v.len(), |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | /// Check if the separator is empty. |
| 105 | pub fn is_empty(&self) -> bool { |