BSON_DECIMAL128_TO_STRING(3)
π BSON_DECIMAL128_TO_STRING(3) π
okay bestie, so this is a page from the libbson manual β yes, that libbson β and it's about turning a decimal128 into a string. glass of water, deep breath, let's go π«Ά
β¨ SYNOPSIS β¨
void
bson_decimal128_to_string (const bson_decimal128_t *dec, char *str);
like, that's the whole vibe. no return value, just vibes and a string. periodt π
π PARAMETERS π
decβ abson_decimal128_t. that's the decimal128 you're converting, the main character of this whole operation β¨strβ a spot in memory of lengthBSON_DECIMAL128_STRINGwhere the resulting string goes. that's right, the length is literallyBSON_DECIMAL128_STRING, do not freestyle it, she needs her room π
π¦ DESCRIPTION π¦
converts dec into a printable string. that's it, that's the tweet. it's giving "simple, effective, iconic" π₯
πΈ EXAMPLE πΈ
ok so imagine you got your buffer and your decimal and you're ready to serve looks:
char decimal128_string[BSON_DECIMAL128_STRING];
bson_decimal128_to_string (&decimal128t, decimal128_string);
two lines. ate and left no crumbs πβ¨
π AUTHOR π
MongoDB, Inc β the icon, the legend, the blueprint π
π COPYRIGHT π
2009-present, MongoDB, Inc. β respectfully, they've been at this since 2009, that's longevity fr fr π«Ά
ngl bestie, this one's a short read. use the right buffer length (BSON_DECIMAL128_STRING) and you're golden π
okay that's the whole page, mwah π this was libbson version 2.5.6, dated Oct 09, 2026 β write it down bestie, iykyk βπ§π
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms