-// SPDX-FileCopyrightText: 2024-2025, Alejandro Colomar <alx@kernel.org>
+// SPDX-FileCopyrightText: 2024-2026, Alejandro Colomar <alx@kernel.org>
// SPDX-License-Identifier: BSD-3-Clause
#include "config.h"
-#include <stdbool.h>
+#include <string.h>
#include "string/ctype/isascii.h"
-#include "string/strcmp/streq.h"
-
-
-inline bool strchriscntrl_c(const char *s);
// strchriscntrl_c - string character is [:cntrl:] C-locale
-inline bool
-strchriscntrl_c(const char *s)
-{
- for (; !streq(s, ""); s++) {
- unsigned char c = *s;
-
- if (iscntrl_c(c))
- return true;
- }
-
- return false;
-}
+#define strchriscntrl_c(s) (!!strpbrk(s, CTYPE_CNTRL_C))
#endif // include guard