6179c2d936f653ebeb1c68c8c4e3571029721066
[reactos.git] / reactos / lib / crtdll / old cruft / mbstring / mbsrev.c
1 #include <msvcrt/mbstring.h>
2
3 /*
4 * @implemented
5 */
6 unsigned char * _mbsrev(unsigned char *s)
7 {
8 unsigned char *e;
9 unsigned char a;
10 e=s;
11 while (*e) {
12 if ( _ismbblead(*e) ) {
13 a = *e;
14 *e = *++e;
15 if ( *e == 0 )
16 break;
17 *e = a;
18 }
19 e++;
20 }
21 while (s<e) {
22 a=*s;
23 *s=*e;
24 *e=a;
25 s++;
26 e--;
27 }
28
29
30 return s;
31 }