Converts the given string into an integer value, returning true if successful.
Declared in <absl/strings/numbers.h>
template<typename int_type>
[[nodiscard]]
bool
SimpleAtoi(
std::string_view str,
int_type* out);
The string (optionally followed or preceded by ASCII whitespace) must reflect a base-10 integer whose value falls within the range of the integer type (optionally preceded by a + or -). If any errors are encountered, this function returns false, leaving out in an unspecified state.
| Name | Description |
|---|---|
| str | The string to parse. |
| out | The location that receives the parsed value. |