pub fn cstring_from_str(s: &str) -> Vec<u8> {
    let bytes = s.as_bytes();
    let mut vec = Vec::with_capacity(bytes.len() + 1);
    vec.extend(bytes.iter().cloned());
    vec.push(0);
    vec
}
/// Make a buffer from a Rust string that's compatible with [CStr::new]
Make a buffer from a Rust string that's compatible with [CStr::new]
Make a buffer from a Rust string that ' s compatible with [ CStr :: new ]
pub fn cstring_from_str(s: &str) -> Vec<u8> {
    let bytes = s.as_bytes();
    let mut vec = Vec::with_capacity(bytes.len() + 1);
    vec.extend(bytes.iter().cloned());
    vec.push(0);
    vec
}
pub fn cstring_from_str ( s : & str ) -> Vec < u8 > { let bytes = s . as_bytes ( ) ; let mut vec = Vec :: with_capacity ( bytes . len ( ) + 1 ) ; vec . extend ( bytes . iter ( ) . cloned ( ) ) ; vec . push ( 0 ) ; vec }
Make a buffer from a Rust string that's compatible with [CStr::new]
Make a buffer from a Rust string that ' s compatible with [ CStr :: new ]
s
&str