bstr_printf (9) Linux Manual Page
bstr_printf – Format a string from binary arguments and place it in a buffer
Synopsis
int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf);
Arguments
buf
-
- The buffer to place the result into
size
- The size of the buffer, including the trailing null space
fmt
- The format string to use
bin_buf
- Binary arguments for the format string
Description
This function like C99 vsnprintf, but the difference is that vsnprintf gets arguments from stack, and bstr_printf gets arguments from bin_buf which is a binary buffer that generated by vbin_printf.
The format follows C99 vsnprintf, but has some extensions: see vsnprintf comment for details.
The return value is the number of characters which would be generated for the given input, excluding the trailing ‘
