[#bsl-stof-03]
= xref:bsl.adoc[bsl]::stof
:relfileprefix: ../
:mrdocs:

Parse the specified `str` as a floating&hyphen;point number&semi; see `stod`&period;

== Synopsis

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

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

== Return Value

`float` value parsed from `str`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| string to parse
| *pos*
| optional output for the index after the parsed value
|===


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