2 * Unicode routines for use inside the server
4 * Copyright (C) 1999 Alexandre Julliard
7 #ifndef __WINE_SERVER_UNICODE_H
8 #define __WINE_SERVER_UNICODE_H
10 #ifndef __WINE_SERVER__
11 #error This file can only be used in the Wine server
24 static inline size_t strlenW( const WCHAR
*str
)
31 static inline int strcmpW( const WCHAR
*str1
, const WCHAR
*str2
)
33 while (*str1
&& (*str1
== *str2
)) { str1
++; str2
++; }
39 #define towupper(ch) (HIBYTE(ch) ? ch : (WCHAR)toupper(LOBYTE(ch)))
42 static inline int strcmpiW( const WCHAR
*str1
, const WCHAR
*str2
)
44 while (*str1
&& (towupper(*str1
) == towupper(*str2
))) { str1
++; str2
++; }
45 return towupper(*str1
) - towupper(*str2
);
48 static inline WCHAR
*strcpyW( WCHAR
*src
, const WCHAR
*dst
)
50 const WCHAR
*ret
= dst
;
51 while ((*src
++ = *dst
++));
55 static inline WCHAR
*strdupW( const WCHAR
*str
)
57 size_t len
= (strlenW(str
) + 1) * sizeof(WCHAR
);
58 return memdup( str
, len
);
61 extern int dump_strW( const WCHAR
*str
, size_t len
, FILE *f
, char escape
[2] );
63 #endif /* __WINE_SERVER_UNICODE_H */