BSON_DECIMAL12...OM_STRING_W_LEN(3)
π
bson_decimal128_from_string_w_len(3) π
okay bestie, you're looking at the libbson manual page for bson_decimal128_from_string_w_len(3) β yes, the name is a whole mouthful, but it's literally iconic for turning a string into a Decimal128. β¨
β¨ SYNOPSIS β¨
bool
bson_decimal128_from_string_w_len (const char *string,
int len,
bson_decimal128_t *dec);
π PARAMETERS π
stringβ A string containing ASCII encoded Decimal128. πlenβ The length ofstringin bytes, or-1meaning the string is null-terminated. π«Άdecβ Abson_decimal128_t. π
π DESCRIPTION π
Parses the string containing ascii encoded Decimal128 and initialize the bytes in dec. See the Decimal128 specification for the exact string format. No cap, that spec is where the exact string-format tea lives. π
πΈ RETURNS πΈ
Returns true if valid Decimal128 string was provided, otherwise false and dec will be set to NaN. π That's the whole vibe check: valid string = true; invalid = false plus dec chilling as NaN.
π¦ EXAMPLE π¦
bson_decimal128_t dec;
bson_decimal128_from_string_w_len ("1.00", 4, &dec);
bson_decimal128_from_string_w_len ("1.00", -1, &dec);
π AUTHOR π
MongoDB, Inc π
π COPYRIGHT π
2009-present, MongoDB, Inc.
mwah π β this page is from libbson version 2.5.6, dated Oct 09, 20. byeeee π«Άβ¨
π¦ 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