Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

bool

Author

       MongoDB, Inc

Description

       Parses the string containing ascii encoded Decimal128 and initialize the bytes in dec. See the Decimal128specification for the exact string format.

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);

Parameters

       • string: A string containing ASCII encoded Decimal128.

       • len: The length of string in bytes, or -1 meaning the string is null-terminated.

       • dec: A bson_decimal128_t.

Returns

       Returns true if valid Decimal128 string was provided, otherwise false and dec will be set to NaN.

Synopsis

          bool
          bson_decimal128_from_string_w_len (const char *string,
                                             int len,
                                             bson_decimal128_t *dec);

See Also