From 5b07c8fc6c3031be9680c1fedb85c570c75a3b96 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 8 Sep 2022 11:12:23 +0200 Subject: [PATCH] util/CharUtil: add IsLowerAlphaNumericASCII() --- src/util/WCharUtil.hxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/WCharUtil.hxx b/src/util/WCharUtil.hxx index 6220f2449..6e387d69a 100644 --- a/src/util/WCharUtil.hxx +++ b/src/util/WCharUtil.hxx @@ -1,5 +1,5 @@ /* - * Copyright 2011-2020 Max Kellermann + * Copyright 2011-2022 Max Kellermann * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -116,6 +116,12 @@ IsAlphaNumericASCII(wchar_t ch) noexcept return IsAlphaASCII(ch) || IsDigitASCII(ch); } +constexpr bool +IsLowerAlphaNumericASCII(wchar_t ch) noexcept +{ + return IsLowerAlphaASCII(ch) || IsDigitASCII(ch); +} + /** * Convert the specified ASCII character (0x00..0x7f) to upper case. * Unlike toupper(), it ignores the system locale.