[−][src]Function ics::escape_text
pub fn escape_text<'a, S>(input: S) -> Cow<'a, str> where
S: Into<Cow<'a, str>>,
Escapes comma, semicolon and backlash character with a backlash.
This method is only necessary for properties with the value type "TEXT".
Example
use ics::escape_text; let line = "Hello, World! Today is a beautiful day to test: Escape Methods.\n Characters like ; or \\ must be escaped."; let expected = "Hello\\, World! Today is a beautiful day to test: Escape Methods.\n Characters like \\; or \\\\ must be escaped."; assert_eq!(expected, escape_text(line));