Strips the newline terminator from `s` if present.
(s: &mut String)
| 29 | |
| 30 | /// Strips the newline terminator from `s` if present. |
| 31 | fn strip_newline(s: &mut String) { |
| 32 | if s.ends_with('\n') { |
| 33 | s.pop(); |
| 34 | if s.ends_with('\r') { |
| 35 | s.pop(); |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /// Parses a propline from `line`. |
| 41 | /// |