Skip to main content

decode_bytes_escape

Function decode_bytes_escape 

Source
pub fn decode_bytes_escape(s: &str) -> Result<Vec<u8>, EscapeError>
Expand description

Decode a string containing escape sequences into a byte vector.

See module-level docs for the accepted escape set. Non-escape input bytes are passed through unchanged, so UTF-8 multi-byte sequences survive verbatim.

ยงErrors

Returns EscapeError on a malformed escape; the variant carries the 0-based byte offset of the offending character.