[#BloombergLP-ball-Log-format]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/Log.adoc[Log]::format
:relfileprefix: ../../../
:mrdocs:

Fill the specified `buffer` with at most the specified `numBytes` characters produced by formatting the variable argument list according to the specified `printf`&hyphen;style `format` argument&semi; return the number of characters in the resulting formatted string&period; The last character placed into `buffer` is always a null terminator (leaving at most `numBytes &hyphen; 1` bytes of formatted data)&period; If `numBytes` is insufficient for the entire formatted string, this method fills `buffer` with the initial `numBytes &hyphen; 1` bytes of formatted data followed by a null terminator and returns &hyphen;1&period; Note that with the exception of the return value, the behavior of this function exactly matches that of the C99 function `snprintf`&period; Also note that `snprintf` is not part of standard C&plus;&plus;&hyphen;98, so its functionality is provided here&period;

== Synopsis

Declared in `&lt;ball&lowbar;log&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
format(
    char* buffer,
    std::size&lowbar;t numBytes,
    char const* format, &period;&period;&period;);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
