binkit 0.1.0

A modular toolbox for analyzing, disassembling, and patching binary formats
Documentation
1
2
3
4
pub fn string_until_null(bytes: &[u8]) -> &str {
    let end = bytes.iter().position(|&b| b == 0).unwrap_or(bytes.len());
    std::str::from_utf8(&bytes[..end]).unwrap_or("<invalid utf8>")
}