Function ruby_vsnprintf

Source
pub unsafe extern "C" fn ruby_vsnprintf(
    str_: *mut c_char,
    n: size_t,
    fmt: *const c_char,
    ap: *mut __va_list_tag,
) -> c_int
Expand description

Identical to ruby_snprintf(), except it takes a va_list. It can also be seen as a routine identical to rb_vsprintf, except it writes back to the passed buffer instead of allocating a new Ruby object.

ยง@param[out] str Return buffer @param[in] n Number of bytes of str. @param[in] fmt A printf-like format specifier. @param[in] ap Contents to format. @return Number of bytes that would have been written to str, if n was large enough. Comparing this to n can give you insights that the buffer is too small or too big. Especially passing 0 to n gives you the exact number of bytes necessary to hold the result string without writing anything to anywhere. @post str holds up to n-1 bytes of formatted contents (and the terminating NUL character.)

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3