OurOS 0.1
Operating System built by McGill Students
 
Loading...
Searching...
No Matches
print.h File Reference
#include <stdint.h>

Go to the source code of this file.

Functions

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.
 

Function Documentation

◆ snprintf()

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.

Parameters
bufPointer to a buffer where the string is stored.
bufszMaximum number of bytes to be used in the buffer.
fmtFormat.
Returns
Number of characters written after truncation, or, if buf == NULL && bufsz == 0, the number of characters to write excluding the null byte.
Note
The result may be truncated to fit in bufsz - 1 bytes. A null character is written after the result in the buffer.