Skip to main content

escape_wchars

Function escape_wchars 

Source
pub fn escape_wchars(source: &[u16]) -> String
Expand description

Encode a NUL-terminated UTF-16 buffer as lowercase hex.

Encoding stops at the first 0 code unit if present; otherwise the whole slice is consumed. Each u16 becomes exactly four hex characters, so the output length is always 4 * (code units consumed).