1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS system libraries 4 * FILE: lib/sdk/crt/string/strrev.c 5 * PURPOSE: Unknown 6 * PROGRAMER: Unknown 7 * UPDATE HISTORY: 8 * 25/11/05: Added license header 9 */ 10 11 #include <precomp.h> 12 13 /* 14 * @implemented 15 */ 16 char * CDECL _strrev(char *s) 17 { 18 char a, *b, *e; 19 b=e=s; 20 while (*e) 21 e++; 22 e--; /* start at last char, not NULL char */ 23 while ( b < e ) 24 { 25 a=*b; 26 *b=*e; 27 *e=a; 28 b++; 29 e--; 30 } 31 return s; /* return ptr to beginning of string */ 32 } 33