From 30784603ee999efa4ece25ead94427d05c675966 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard <julliard@winehq.org> Date: Sat, 27 Sep 2003 03:48:40 +0000 Subject: [PATCH] Added strspnW and strcspnW. --- include/wine/unicode.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/wine/unicode.h b/include/wine/unicode.h index 98ad0fb919d..72730b3eca2 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -251,6 +251,20 @@ static inline WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept ) return NULL; } +static inline size_t strspnW( const WCHAR *str, const WCHAR *accept ) +{ + const WCHAR *ptr; + for (ptr = str; *ptr; ptr++) if (!strchrW( accept, *ptr )) break; + return ptr - str; +} + +static inline size_t strcspnW( const WCHAR *str, const WCHAR *reject ) +{ + const WCHAR *ptr; + for (ptr = str; *ptr; ptr++) if (strchrW( reject, *ptr )) break; + return ptr - str; +} + static inline WCHAR *strlwrW( WCHAR *str ) { WCHAR *ret = str; -- GitLab