#[unsafe(no_mangle)]pub extern "C" fn nstd_io_stdin_lock_read_to_string(
handle: &mut NSTDStdinLock,
buffer: &mut NSTDString<'_>,
) -> NSTDIOResultAvailable on crate feature
io only.Expand description
Continuously reads UTF-8 data from stdin into a string buffer until EOF is reached.
§Note
If extending the buffer fails, an error code of NSTD_IO_ERROR_OUT_OF_MEMORY will be returned.
This does not mean there were no bytes read from handle in this case.
§Parameters:
-
NSTDStdinLock *handle- A locked handle to the standard input stream. -
NSTDString *buffer- The buffer to be extended with data from stdin.
§Returns
NSTDIOResult read - The number of bytes read from handle on success, or the I/O operation
error code on failure.