[#absl-SimpleHexAtoi-0a2] = xref:absl.adoc[absl]::SimpleHexAtoi :relfileprefix: ../ :mrdocs: Converts a hexadecimal string to an integer, returning `true` if successful. == Synopsis Declared in `<absl/strings/numbers.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename int_type> [[nodiscard]] bool SimpleHexAtoi( std::string_view str, int_type* out); ---- == Description The string (optionally followed or preceded by ASCII whitespace) must be a valid base‐16 hexadecimal integer whose value falls within the range of the integer type (optionally preceded by a `+` or `‐`). A valid hexadecimal value may include both upper and lowercase character symbols, and may optionally include a leading "0x" (or "0X") number prefix, which is ignored by this function. 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]#