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.
§Errors
Propagates the writer’s I/O error. Truncation is not one: an over-long s
is cut silently.