pub(super) fn write_cstring<W: Write>(writer: &mut W, string: &str) -> Result<()> {
    // Write the string's UTF-8 bytes.
    writer.write_all(string.as_bytes())?;

    // Write the null terminator.
    writer.write_all(&[0])?;

    Ok(())
}
/// Serializes `string` to bytes and writes them to `writer` with a null terminator appended.
Serializes `string` to bytes and writes them to `writer` with a null terminator appended.
Serializes ` string ` to bytes and writes them to ` writer ` with a null terminator appended .
pub(super) fn write_cstring<W: Write>(writer: &mut W, string: &str) -> Result<()> {
    // Write the string's UTF-8 bytes.
    writer.write_all(string.as_bytes())?;
    // Write the null terminator.
    writer.write_all(&[0])?;
    Ok(())
}
pub ( super ) fn write_cstring < W : Write > ( writer : & mut W , string : & str ) -> Result < ( ) > { // Write the string's UTF-8 bytes. writer . write_all ( string . as_bytes ( ) ) ? ; // Write the null terminator. writer . write_all ( & [ 0 ] ) ? ; Ok ( ( ) ) }
Serializes `string` to bytes and writes them to `writer` with a null terminator appended.
Serializes ` string ` to bytes and writes them to ` writer ` with a null terminator appended .
writer
&mut W
string
&str
writer
&mut W
string
&str