---
name: "bson_vsnprintf"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_vsnprintf"
---

# bson\_vsnprintf(3)

## SYNOPSIS

```
int
bson_vsnprintf (char *str, size_t size, const char *format, va_list ap);
```

## PARAMETERS

- •

  **str**: A location for the resulting string.

- •

  **size**: The size of str in bytes.

- •

  **format**: A printf style format string.

- •

  **ap**: A va\_list of parameters for the format.

## DESCRIPTION

Like bson\_snprintf() but allows for variadic parameters.

## RETURNS

The number of bytes written to **str** excluding the **\\0** byte.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
