munyo 0.8.0

A data language which aims to be the most efficient way to handwrite data.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub(crate) fn make_escaped_string(s: &str) -> String {
    let mut r = String::with_capacity(s.len());
    for c in s.chars() {
        match c {
            '|' => r.push_str("\\|"),
            '\\' => r.push_str("\\\\"),
            '\r' => r.push_str("\\r"),
            '\n' => r.push_str("\\n"),
            '\t' => r.push_str("\\t"),
            _ => r.push(c),
        }
    }
    r
}