From: "Tim Nicholson" Newsgroups: comp.os.msdos.djgpp Subject: Re: Please add strrev proposal Date: Sat, 29 Sep 2001 12:14:46 +0100 Organization: Skyforce avionics Limited Lines: 52 Message-ID: <9p4ajh$gv$1@plutonium.btinternet.com> References: NNTP-Posting-Host: 213.123.18.202 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Here is another version of strrev (I called in flipstring) which I wrote years ago! - I make no claims on it, so feel free to do with it as you please ;-) char *flipstring(char *str) { int max,hi,lo; max=strlen(str); hi=max-1; lo=0; while (lo < hi) { str[max] = str[lo]; str[lo++] = str[hi]; str[hi--] = str[max]; } str[max] = 0; return str; } Tim Tim "A. Sinan Unur" wrote in message news:Xns912AAABE1AF49ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8... > Radical NetSurfer wrote in > news:m1g9rtociqgunetpgm7qb5106m3sqvhpor AT 4ax DOT com: > > > in my humble opinion, its NONstandard that Libc doesn't already have > > this. Please name one other C/C++ compiler that also omits it? > > AFAIK, it is not in the ISO standard, and that makes it nonstandard. > > I also posted an example where your usage example contradicts how the code > actually works. (The same holds true with bcc if you use the strrev > function provided with it). > > My opinion does not matter that much, however. > > Sinan. > -- > -------------------------------- > A. Sinan Unur > http://www.unur.com/