Scroll to navigation

BSON_UINT32_TO_STRING(3) Library Functions Manual BSON_UINT32_TO_STRING(3)

NAME

bson_uint32_to_string() - Converts value to a string.

SYNOPSIS


size_t bson_uint32_to_string (uint32_t value, const char **strptr, char *str, size_t size);

See for example usage.

PARAMETERS

value
A uint32_t.
strptr
A location for the resulting string pointer.
str
A location to buffer the string.
size
A size_t containing the size of str

DESCRIPTION

Converts value to a string.

If value is from 0 to 999, it will use a constant string in the data section of the library.

If not, a string will be formatted using str and snprintf(3)

strptr will always be set. It will either point to str or a constant string. Use this as your key.

RETURNS

The number of bytes in the resulting string.

COLOPHON

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
2016‐10‐12 libbson