---
name: "bson_decimal128_to_string"
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_decimal128_to_string"
---

# bson\_decimal128\_to\_string(3)

## SYNOPSIS

```
void
bson_decimal128_to_string (const bson_decimal128_t *dec, char *str);
```

## PARAMETERS

- •

  **dec**: A *bson\_decimal128\_t*.

- •

  **str**: A location of length BSON\_DECIMAL128\_STRING for the resulting string.

## DESCRIPTION

Converts **dec** into a printable string.

## EXAMPLE

```
char decimal128_string[BSON_DECIMAL128_STRING];
bson_decimal128_to_string (&decimal128t, decimal128_string);
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
