bsl::stoull

stoull overloads

Synopses

Declared in <bslstl_string.h>

Return the value of the specified str by parsing the string and interpreting its content as an integral number. Optionally specify pos whose value is set to the position of the next character in str after the numerical value. Optionally specify base used to change the interpretation of str to a integral number written in the given base. Valid bases are bases in the range of [2,36]and base 0, where base 0 automatically determines the base while parsing the string: the base will be 16 if the number is prefixed with 0x or 0X, base 8 if the number is prefixed with a 0, and base 10 otherwise. The function ignores leading white space characters and interprets as many characters possible to form a valid integral number in the chosen base. If no conversion could be performed, then an invalid_argument exception is thrown. If the value read is out of range of the return type, then an out_of_range exception is thrown. The behavior is undefined unless base is valid. Note that negative numbers are parsed by interpreting the numeric sequence following the - character, and then negating the result, so that stoul and stoull have defined results for negative numbers where the absolute value falls in the valid range for the corresponding signed conversion.

unsigned long long
stoull(
    string const& str,
    std::size_t* pos = 0,
    int base = 10);
» more...

Same as stoull for wstring.

unsigned long long
stoull(
    wstring const& str,
    std::size_t* pos = 0,
    int base = 10);
» more...