icalendar::parser

Function 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")