Crate nstd_io

Source

Functions§

nstd_io_flush
Attempts to flush stdout. Returns: int errc - Nonzero on error.
nstd_io_flush_err
Attempts to flush stderr. Returns: int errc - Nonzero on error.
nstd_io_free_read
Frees memory allocated by nstd_io_read and nstd_io_readline. Parameters: const char **str - Pointer to the string returned from the read functions.
nstd_io_read
Reads from stdin and returns the read string. Parameters: int *errc - Error code, returns as nonzero on error. Returns: char *in - String read from stdin.
nstd_io_read_char
Reads a single character from stdin. Parameters: int *errc - Error code, returns as nonzero on error. Returns: char ch - Character read from stdin.
nstd_io_read_line
Reads from stdin and returns the read string appending a newline to the end. Parameters: int *errc - Error code, returns as nonzero on error. Returns: char *in - String read from stdin.
nstd_io_write
Writes str to stdout. Parameters: const char *const str - String to write to stdout. Returns: int errc - Nonzero on error.
nstd_io_write_char
Writes a single character to stdout. Parameters: const char ch - Character to write. Returns: int errc - Nonzero on error.
nstd_io_write_char_err
Writes a single character to stderr. Parameters: const char ch - Character to write. Returns: int errc - Nonzero on error.
nstd_io_write_err
Writes str to stderr. Parameters: const char *const str - String to write to stderr. Returns: int errc - Nonzero on error.
nstd_io_write_line
Writes str to stdout with an additional newline. Parameters: const char *const str - String to write to stdout. Returns: int errc - Nonzero on error.
nstd_io_write_line_err
Writes str to stderr with an additional newline. Parameters: const char *const str - String to write to stderr. Returns: int errc - Nonzero on error.
nstd_io_write_raw
Writes a raw byte slice to stdout. Parameters: const NSTDSlice *const bytes - The byte slice to write to stdout. Returns: int errc - Nonzero on error.
nstd_io_write_raw_err
Writes a raw byte slice to stderr. Parameters: const NSTDSlice *const bytes - The byte slice to write to stderr. Returns: int errc - Nonzero on error.