pub fn linux_get_str<const CAP: usize>(
buffer: &mut [u8; CAP],
stop: char,
) -> &str ⓘ
Available on crate features
unsafe_syscall
and linux
only.Expand description
Gets a string from stdin backed by a buffer
,
until the stop
char is received.
§Examples
use devela::linux_get_str;
let mut buf = [0_u8; 32];
let name: &str = linux_get_str::<32>(&mut buf, '\n');