GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BSON_UINT32_TO_STRING(3) libbson BSON_UINT32_TO_STRING(3)

size_t
bson_uint32_to_string (uint32_t value,

const char **strptr,
char *str,
size_t size);


  • 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.

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().

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

Each element in a BSON array has a monotonic string key like "0", "1", etc. This function is optimized for generating such string keys.

char str[16];
const char *key;
uint32_t i;
for (i = 0; i < 10; i++) {

bson_uint32_to_string (i, &key, str, sizeof str);
printf ("Key: %s\n", key); }


The number of bytes in the resulting string.

MongoDB, Inc

2009-present, MongoDB, Inc.

July 3, 2025 1.30.4

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.