Added isDecimalChar() and isHexadecimalChar().
This commit is contained in:
parent
aff59724fc
commit
24033dbfcc
@ -350,6 +350,22 @@ constexpr bool toNumber(std::basic_string_view<TChar, TTraits> stringView, TNumb
|
||||
return toNumber(asString, outNumber, base);
|
||||
}
|
||||
|
||||
template<typename TChar>
|
||||
[[nodiscard]]
|
||||
constexpr bool isDecimalChar(TChar chr) noexcept
|
||||
{
|
||||
return (chr >= TChar('0') && chr <= TChar('9'));
|
||||
}
|
||||
|
||||
template<typename TChar>
|
||||
[[nodiscard]]
|
||||
constexpr bool isHexadecimalChar(TChar chr) noexcept
|
||||
{
|
||||
return isDecimalChar(chr)
|
||||
|| (chr >= TChar('A') && chr <= TChar('F'))
|
||||
|| (chr >= TChar('a') && chr <= TChar('f'));
|
||||
}
|
||||
|
||||
namespace pipe
|
||||
{
|
||||
struct Join
|
||||
|
Loading…
x
Reference in New Issue
Block a user