Function core::char::escape_default[src]
pub fn escape_default(c: char, f: |char|)
Returns a 'default' ASCII and C++11-like literal escape of a char
The default is chosen with a bias toward producing literals that are legal in a variety of languages, including C++11 and similar C-family languages. The exact rules are:
- Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
- Single-quote, double-quote and backslash chars are backslash-escaped.
- Any other chars in the range [0x20,0x7e] are not escaped.
- Any other chars are given hex unicode escapes; see
escape_unicode.