xieite::isdigit()

Defined in header <xieite/math/isdigit.hpp>

Checks if a character is a digit. Serves as an improvement on std::isdigit().


Declaration

template<xieite::is_char Char = char>
[[nodiscard]] constexpr auto isdigit(Char c) noexcept;


Example

static_assert(xieite::isdigit('4'));
static_assert(!xieite::isdigit('h'));
[View in Compiler Explorer]