OurOS 0.1
Operating System built by McGill Students
 
Loading...
Searching...
No Matches
print.h
Go to the documentation of this file.
1#ifndef _SYS_PRINT_H
2#define _SYS_PRINT_H
3
4#include <stdint.h>
5
6/**
7 * @brief Writes a string to a fixed-capacity buffer according to a format and arguments.
8 *
9 * @param buf Pointer to a buffer where the string is stored.
10 * @param bufsz Maximum number of bytes to be used in the buffer.
11 * @param fmt Format.
12 * @return Number of characters written after truncation, or, if buf == NULL &&
13 * bufsz == 0, the number of characters to write excluding the null byte.
14 *
15 * @note The result may be truncated to fit in bufsz - 1 bytes. A null character is
16 * written after the result in the buffer.
17 */
18uint64_t snprintf(char *buf, uint64_t bufsz, const char *fmt, ...);
19
20#endif
uint64_t snprintf(char *buf, uint64_t bufsz, const char *fmt,...)
Writes a string to a fixed-capacity buffer according to a format and arguments.
Definition print.c:5
unsigned long uint64_t
Definition stdint.h:7