Skip to main content

utf8_esc

Function utf8_esc 

Source
pub fn utf8_esc(buff: &mut [u8; 8], x: u32) -> usize
Expand description

Encodes Unicode codepoint x as UTF-8 into buff (filled backwards from index UTF8_BUF_SZ - 1). Returns the number of bytes written. The valid bytes occupy buff[UTF8_BUF_SZ - n .. UTF8_BUF_SZ].