[#BIO_vsnprintf]
= BIO&lowbar;vsnprintf
:mrdocs:

Format a string into `buf` like vsnprintf, using OpenSSL&apos;s portable formatter&period;

== Synopsis

Declared in `&lt;openssl&sol;bio&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BIO&lowbar;vsnprintf(
    char* buf,
    size&lowbar;t n,
    char const* format,
    va&lowbar;list args);
----

== Return Value

Length that would have been written excluding the NUL, or &hyphen;1 on encoding error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buf*
| Destination buffer&period;
| *n*
| Capacity of `buf` in bytes (including the trailing NUL)&period;
| *format*
| printf&hyphen;style format string&period;
| *args*
| Variable&hyphen;argument list for `format&period;`
|===


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