absl::SimpleHexAtoi

SimpleHexAtoi overloads

Synopses

Declared in <absl/strings/numbers.h>

Overload of SimpleHexAtoi() for signed 128-bit integers.

[[nodiscard]]
bool
SimpleHexAtoi(
    std::string_view str,
    absl::int128* out);
» more...

Overload of SimpleHexAtoi() for unsigned 128-bit integers.

[[nodiscard]]
bool
SimpleHexAtoi(
    std::string_view str,
    absl::uint128* out);
» more...

Converts a hexadecimal string to an integer, returning true if successful.

template<typename int_type>
[[nodiscard]]
bool
SimpleHexAtoi(
    std::string_view str,
    int_type* out);
» more...

Return Value

true on success; otherwise false.

NOTE

The return value should not be discarded.

Parameters

NameDescription
strThe string to parse.
outThe location that receives the parsed value.