1BSON_ASCII_STRTOLL(3) Libbson BSON_ASCII_STRTOLL(3)
2
3
4
6 bson_ascii_strtoll - bson_ascii_strtoll()
7
9 int64_t
10 bson_ascii_strtoll (const char *str, char **endptr, int base);
11
13 · str: The string to convert.
14
15 · endptr: Address of the first invalid character of str, or null.
16
17 · base: The base to use for the conversion.
18
20 A portable version of strtoll().
21
22 Converts a string to a 64-bit signed integer according to the given
23 base, which must be 16, 10, or 8. Leading whitespace will be ignored.
24
25 If base is 0 is passed in, the base is inferred from the string's lead‐
26 ing characters. Base-16 numbers start with "0x" or "0X", base-8 numbers
27 start with "0", base-10 numbers start with a digit from 1 to 9.
28
29 If endptr is not NULL, it will be assigned the address of the first
30 invalid character of str, or its null terminating byte if the entire
31 string was valid.
32
33 If an invalid value is encountered, errno will be set to EINVAL and
34 zero will be returned. If the number is out of range, errno is set to
35 ERANGE and LLONG_MAX or LLONG_MIN is returned.
36
38 The result of the conversion.
39
41 MongoDB, Inc
42
44 2017-present, MongoDB, Inc
45
46
47
48
491.13.1 Jan 24, 2019 BSON_ASCII_STRTOLL(3)