lwprintf_snprintf_ex

Function lwprintf_snprintf_ex 

Source
pub unsafe extern "C" fn lwprintf_snprintf_ex(
    lwobj: *mut lwprintf_s,
    s: *mut c_char,
    n: usize,
    format: *const c_char,
    ...
) -> c_int
Expand description

Write formatted data from variable argument list to sized buffer.

§Arguments

  • lwobj - LwPRINTF instance. Set to NULL to use default instance.
  • s - Pointer to a buffer where the resulting C-string is stored. The buffer should have a size of at least n characters.
  • n - Maximum number of bytes to be used in the buffer. The generated string has a length of at most n - 1, leaving space for the additional terminating null character.
  • format - C string that contains a format string that follows the same specifications as format in printf.
  • ... - Optional arguments for format string.

§Returns

The number of characters that would have been written if n had been sufficiently large, not counting the terminating null character.