bsl::stof

Parse the specified str as a floating-point number; see stod.

Synopsis

Declared in <bslstl_string.h>

float
stof(
    string const& str,
    std::size_t* pos = 0);

Return Value

float value parsed from str

Parameters

NameDescription
strstring to parse
posoptional output for the index after the parsed value