Function icalendar::parser::unfold

source ·
pub fn unfold(input: &str) -> String
Expand description

Normalize content lines.

This simplifies line endings and unfolds breaks to simplify parsing. iCal specifies that content may be folded and to fit into a certain length, which must be undone before parsing.

This is a copying operation.

§Example

#[rustfmt::skip]
let line = "this gets w\r
 rapped i\r
 n a w\r
 eird\r
  way";

assert_eq!(unfold(line), "this gets wrapped in a weird way")