pub fn to_cstring<S, E>(string: S, error_message: E) -> Result<CString, Error>where
    S: AsRef<str>,
    E: AsRef<str>,