[#absl-SimpleAtof] = xref:absl.adoc[absl]::SimpleAtof :relfileprefix: ../ :mrdocs: Converts the given string into a float, returning `true` if successful. == Synopsis Declared in `<absl/strings/numbers.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] bool SimpleAtof( std::string_view str, float* out); ---- == Description The string (optionally followed or preceded by ASCII whitespace) may be rounded on overflow or underflow. See https://en.cppreference.com/w/c/string/byte/strtof for details about the allowed formats for `str`, except `SimpleAtof()` is locale‐independent and will always use the "C" locale. If any errors are encountered, this function returns `false`, leaving `out` in an unspecified state. == Return Value `true` on success; otherwise `false`. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *str* | The string to parse. | *out* | The location that receives the parsed value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#