1BSON_DECIMAL128_FROM_STRING_W_LEN(3)libbsonBSON_DECIMAL128_FROM_STRING_W_LEN(3)
2
3
4
6 bson_decimal128_from_string_w_len - bson_decimal128_from_string_w_len()
7
9 bool
10 bson_decimal128_from_string_w_len (const char *string,
11 int len,
12 bson_decimal128_t *dec);
13
15 • string: A string containing ASCII encoded Decimal128.
16
17 • len: The length of string in bytes, or -1 meaning the string is
18 null-terminated.
19
20 • dec: A bson_decimal128_t.
21
23 Parses the string containing ascii encoded Decimal128 and initialize
24 the bytes in dec. See the Decimal128 specification for the exact string
25 format.
26
28 Returns true if valid Decimal128 string was provided, otherwise false
29 and dec will be set to NaN.
30
32 bson_decimal128_t dec;
33 bson_decimal128_from_string_w_len ("1.00", 4, &dec);
34 bson_decimal128_from_string_w_len ("1.00", -1, &dec);
35
37 MongoDB, Inc
38
40 2017-present, MongoDB, Inc
41
42
43
44
451.24.3 Aug 17, 20B2S3ON_DECIMAL128_FROM_STRING_W_LEN(3)