From: Robert Hoehne Newsgroups: comp.os.msdos.djgpp Subject: Re: "Missing" functions Date: Tue, 05 Aug 1997 12:52:57 +0200 Organization: TU Chemnitz-Zwickau Lines: 39 Message-ID: <33E70609.6C9E0CC8@Mathematik.TU-Chemnitz.DE> References: <97Aug4.135334gmt+0100 DOT 17050 AT internet01 DOT amc DOT de> NNTP-Posting-Host: atair.hrz.tu-chemnitz.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Chris Croughton wrote: > > Robert Hoehne wrote: > > > Use strcasecmp() instead, which is more partable > > and the same. > > In what way is strcasecmp more portable than stricmp? > I've never seen strcasecmp on any other compiler, and > stricmp is at least standard on PC compilers and a lot > of the older Unices (Borland, at least, had 'strcmpi' > as a macro alias for 'stricmp'). > > The fact is, there is no portable case-independent > string comparison function unless you write it yourself. > It's one of the oddities in the ANSI library - Plauger > just says "The set of functions is incomplete and > inconsistent", but doesn't mention case-independent > compare as one of the lacks. Strange, since most > implementations before the ANSI deliberations did > include it (either stricmp or strcmpi, sometimes also > combinations like strnicmp) and much of the ANSI string > deliberations were about locale issues where case folding > would logically have a place. I don't know why, but probably you have misunderstood me. I have not said, that strcasecmp is portable or any ANSI function, I simply said that it is more partable, because at least in the GNU programming environment this function is known. Robert -- ***************************************************************** * Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau * * Post: Am Berg 3, D-09573 Dittmannsdorf * * e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE * * WWW: http://www.tu-chemnitz.de/~rho * *****************************************************************