Function nstd_sys::cstring::nstd_cstring_push
source · #[no_mangle]
pub extern "C" fn nstd_cstring_push(
cstring: &mut NSTDCString,
chr: NSTDChar
)Available on crate feature
nstd_cstring only.Expand description
Appends an NSTDChar to the end of an NSTDCString.
This will have no effect if chr is a null byte (0).
Parameters:
-
NSTDCString *cstring- The C string. -
NSTDChar chr- The C char to append to the C string.
Panics
This operation panics if chr cannot be appended to the C string.
Example
use nstd_sys::{
cstring::{nstd_cstring_new, nstd_cstring_push},
NSTDChar,
};
let mut cstring = nstd_cstring_new();
nstd_cstring_push(&mut cstring, b'!' as NSTDChar);