quil 0.4.1

A simple logger for Rust projects
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13

pub fn escape_chars(i: &str, chars: &str) -> String {
  let mut o = String::new();
  let mut esc = false;
  for c in i.chars() {
    if !esc && chars.find(c).is_some() {
      o.push('\\');
    }
    esc = c == '\\';
    o.push(c);
  }
  o
}