escape_bytes_human_readable

Function escape_bytes_human_readable 

Source
pub fn escape_bytes_human_readable(bytes: &[u8]) -> String
Expand description

Formats arbitrary binary bytes into a human-readable, valid UTF-8 string, preserving valid UTF-8 text and escaping invalid UTF-8 bytes and control characters as \xHH or standard escape sequences.