Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. char* strrev(char *p)
  2. {
  3.   char *q = p, *res = p, z;
  4.   while(q && *q) ++q; /* find eos */
  5.   for(--q; p < q; ++p, --q)
  6.   {    
  7.         z = *p;
  8.         *p = *q;
  9.         *q = z;
  10.   }
  11.   return res;
  12. }