Split IP stuff into separate source and WIP implementation of name resolution.
This commit is contained in:
@@ -299,7 +299,10 @@ template<typename TChar, typename TTraits, typename TNumber>
|
||||
[[nodiscard]]
|
||||
constexpr bool toNumber(std::basic_string_view<TChar, TTraits> stringView, TNumber& outNumber, int base = 10) noexcept requires (!std::is_same_v<TChar, char>)
|
||||
{
|
||||
std::string asString(stringView.begin(), stringView.end());
|
||||
std::string asString;
|
||||
asString.resize(stringView.size());
|
||||
// should only contain number symbols, so just cast down to char
|
||||
std::transform(stringView.begin(), stringView.end(), asString.begin(), [](TChar chr) { return static_cast<char>(chr); });
|
||||
return toNumber(asString, outNumber, base);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user