[#bsl-stold-04]
= xref:bsl.adoc[bsl]::stold
:relfileprefix: ../
:mrdocs:

`stold` overloads

== Synopses

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

Parses `str` interpreting its contents as a floating point number&period; In C&plus;&plus;11 if the number in `str` is prefixed with `0x` or `0X` the string will be interpreted as a hex number&period; If there is no leading 0x or 0X the string will be interpreted as a decimal number&period; Optionally specify `pos` whose value is set to the position of the next character after the numerical value&period; The function ignores leading white space characters and interprets as many characters possible to form a valid floating point number&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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
long double
xref:bsl/stold-02.adoc[stold](
    xref:bsl/string.adoc[string] const& str,
    std::size&lowbar;t* pos = 0);
----

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
long double
xref:bsl/stold-06.adoc[stold](
    xref:bsl/wstring.adoc[wstring] const& str,
    std::size&lowbar;t* pos = 0);
----

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


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