write_fixed_c_string

Function write_fixed_c_string 

Source
pub fn write_fixed_c_string<W: Write>(
    writer: &mut W,
    s: &str,
    field_size: usize,
) -> Result<()>
Expand description

Writes a null-terminated string into a fixed-size field, zero-padded.

Truncates s to field_size - 1 bytes to guarantee a null terminator. The remaining bytes are filled with zeros.