Skip to main content

mutf8_encode

Function mutf8_encode 

Source
pub fn mutf8_encode(s: &str) -> Vec<u8> ⓘ
Expand description

Encode a Rust string as MUTF-8 (CESU-8): BMP characters use their normal UTF-8 bytes, supplementary characters become surrogate pairs, and U+0000 becomes 0xC0 0x80. Byte-level string matching (filters, findrefs queries) needs this form to reach names/literals above the BMP — a UTF-8 needle can never match their dex encoding.