Add more character utility functions

This commit is contained in:
Rangi42
2025-08-19 19:12:58 -04:00
parent 94e9ef5213
commit 386fb5f398
9 changed files with 64 additions and 64 deletions

View File

@@ -3,6 +3,7 @@
#include "diagnostics.hpp"
#include "style.hpp"
#include "util.hpp" // isDigit
void warnx(char const *fmt, ...) {
va_list ap;
@@ -60,7 +61,7 @@ std::pair<WarningState, std::optional<uint32_t>> getInitialWarningState(std::str
uint32_t param = 0;
bool overflowed = false;
for (; *ptr >= '0' && *ptr <= '9'; ++ptr) {
for (; isDigit(*ptr); ++ptr) {
if (overflowed) {
continue;
}