Cygwin: wcichr: add wint_t replacement for wcschr

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2023-03-01 10:36:55 +01:00
parent b81969345d
commit 9870f1d1ff
1 changed files with 13 additions and 0 deletions

View File

@ -72,6 +72,19 @@ wcilen (const wint_t *wcs)
return ret;
}
/* like wcschr, just for wint_t */
static inline wint_t *
wcichr (const wint_t *str, wint_t chr)
{
do
{
if (*str == chr)
return (wint_t *) str;
}
while (*str++);
return NULL;
}
/* like wcscmp, just for wint_t */
static inline int
wcicmp (const wint_t *s1, const wint_t *s2)