pub fn basic_escape(unescaped_str: &str) -> RUMString
Expand description
Escape UTF-8 characters in UTF-8 string that are beyond ascii range
§Example
use rumtk_core::strings::basic_escape;
let message = "I ❤ my wife!";
let escaped_message = basic_escape(&message);
assert_eq!("I \\u{2764} my wife!", &escaped_message, "Did not get expected escaped string! Got {}!", &escaped_message);