Update internal controls on WM_WINDOWPOSCHANGED.
[wine/multimedia.git] / dlls / ntdll / string.c
blob5e552b784b808038ea2baba3519601d8d18cae73
1 /*
2 * NTDLL string functions
4 * Copyright 2000 Alexandre Julliard
5 */
7 #include "config.h"
9 #include <ctype.h>
10 #include <string.h>
12 #include "windef.h"
14 /*********************************************************************
15 * _memicmp (NTDLL)
17 INT __cdecl _memicmp( LPCSTR s1, LPCSTR s2, DWORD len )
19 int ret = 0;
20 while (len--)
22 if ((ret = tolower(*s1) - tolower(*s2))) break;
23 s1++;
24 s2++;
26 return ret;
29 /*********************************************************************
30 * _strupr (NTDLL)
32 LPSTR __cdecl _strupr( LPSTR str )
34 LPSTR ret = str;
35 for ( ; *str; str++) *str = toupper(*str);
36 return ret;
39 /*********************************************************************
40 * _strlwr (NTDLL)
42 * convert a string in place to lowercase
44 LPSTR __cdecl _strlwr( LPSTR str )
46 LPSTR ret = str;
47 for ( ; *str; str++) *str = tolower(*str);
48 return ret;
52 /*********************************************************************
53 * _ultoa (NTDLL)
55 LPSTR __cdecl _ultoa( unsigned long x, LPSTR buf, INT radix )
57 char buffer[32], *p;
59 p = buffer + sizeof(buffer);
60 *--p = 0;
63 int rem = x % radix;
64 *--p = (rem <= 9) ? rem + '0' : rem + 'a' - 10;
65 x /= radix;
66 } while (x);
67 strcpy( buf, p + 1 );
68 return buf;
72 /*********************************************************************
73 * _ltoa (NTDLL)
75 LPSTR __cdecl _ltoa( long x, LPSTR buf, INT radix )
77 LPSTR p = buf;
78 if (x < 0)
80 *p++ = '-';
81 x = -x;
83 _ultoa( x, p, radix );
84 return buf;
88 /*********************************************************************
89 * _itoa (NTDLL)
91 LPSTR __cdecl _itoa( int x, LPSTR buf, INT radix )
93 return _ltoa( x, buf, radix );