[#bsl-stoull-0a]
= xref:bsl.adoc[bsl]::stoull
:relfileprefix: ../
:mrdocs:

`stoull` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

Return the value of the specified `str` by parsing the string and interpreting its content as an integral number&period; Optionally specify `pos` whose value is set to the position of the next character in `str` after the numerical value&period; Optionally specify `base` used to change the interpretation of `str` to a integral number written in the given `base`&period; Valid bases are bases in the range of &lsqb;2,36&rsqb;and base 0, where base 0 automatically determines the base while parsing the string&colon; 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&period; The function ignores leading white space characters and interprets as many characters possible to form a valid integral number in the chosen base&period; If no conversion could be performed, then an `invalid&lowbar;argument` exception is thrown&period; If the value read is out of range of the return type, then an `out&lowbar;of&lowbar;range` exception is thrown&period; The behavior is undefined unless `base` is valid&period; Note that negative numbers are parsed by interpreting the numeric sequence following the `&hyphen;` 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&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
unsigned long long
xref:bsl/stoull-058.adoc[stoull](
    xref:bsl/string.adoc[string] const& str,
    std::size&lowbar;t* pos = 0,
    int base = 10);
----

[.small]#xref:bsl/stoull-058.adoc[_» more&period;&period;&period;_]#

Same as `stoull` for `wstring`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
unsigned long long
xref:bsl/stoull-051.adoc[stoull](
    xref:bsl/wstring.adoc[wstring] const& str,
    std::size&lowbar;t* pos = 0,
    int base = 10);
----

[.small]#xref:bsl/stoull-051.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
