New upstream version 4.17.3

This commit is contained in:
Chris Hofstaedtler
2025-02-24 22:57:12 +01:00
parent 65261e28f4
commit a475f464e0
543 changed files with 6960 additions and 4050 deletions
+12
View File
@@ -0,0 +1,12 @@
// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
// SPDX-License-Identifier: BSD-3-Clause
#include <config.h>
#include "string/ctype/strisascii/strisdigit.h"
#include <stdbool.h>
extern inline bool strisdigit(const char *s);
+32
View File
@@ -0,0 +1,32 @@
// SPDX-FileCopyrightText: 2024, Alejandro Colomar <alx@kernel.org>
// SPDX-License-Identifier: BSD-3-Clause
#ifndef SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_STRISDIGIT_H_
#define SHADOW_INCLUDE_LIB_STRING_CTYPE_STRISASCII_STRISDIGIT_H_
#include <config.h>
#include <stdbool.h>
#include "string/strcmp/streq.h"
#include "string/strspn/stpspn.h"
inline bool strisdigit(const char *s);
// string is [:digit:]
// Like isdigit(3), but check all characters in the string.
inline bool
strisdigit(const char *s)
{
if (streq(s, ""))
return false;
return streq(stpspn(s, "0123456789"), "");
}
#endif // include guard