trim_nuls

Function trim_nuls 

Source
pub fn trim_nuls(buf: &[u8]) -> &[u8] ⓘ
Expand description

Trims trailing NUL bytes while preserving parity for UTF-16 character boundaries. Ported from trim_nuls in ascmagic.c.