32 number(
const char *str,
int base = 10)
49 number(
const char *str,
int base = 10)
81 else if (errno == ERANGE)
93 return number<T>(str.
c_str(), base);
105 template <
typename T>
109 return number<T>(str.
c_str());
123 [](
unsigned char ch) { return !std::isspace(ch) && ch !=
'\0'; });
125 str.erase(from.base(), str.end());
static std::string & rtrim(std::string &str) noexcept
Removes trailing whitespace from a string in-place.
Definition: string.hpp:118
std::enable_if< std::is_integral_v< T > &&std::is_unsigned_v< T >, T >::type number(const char *str, int base=10)
Parses a string as a numeric value with strict formatting and range checks.
Definition: string.hpp:32
auto end(const struct ifaddrs *ptr) noexcept
Returns an input iterator pointing to the end of a struct ifaddrs array.
Definition: sockets.hpp:537