This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: strcasestr not found


You could write your own function that does what strcasestr is supposed
to do.  I'm guessing it's supposed to be a case-insensitive version of
strstr.

A simple implementation might be to have your strcasestr function take
its string arguments, make uppercase (or lowercase) copies of them and
then call the real strstr with the smashed case copies of the arguments.
Then, adjust the return value from strstr (a pointer into one of the
strings) to reflect the corresponding position in the original
arguments.  Hmmm. This is getting somewhat complicated.

Another approach would be to grab the Cygwin sources for strstr.  Make a
copy of the strstr function called strcasestr, and then adjust the
implementation to do case-insensitive comparisons.

All assuming my guess on what strcasestr is supposed to do is correct.

stephan();



-----Original Message-----
From: Robert Mark Bram [mailto:relaxedrob@optushome.com.au] 
Sent: Saturday, June 08, 2002 10:43 PM
To: Cygwin
Subject: strcasestr not found


Howdy all!

I have some C code that uses a function called "strcasestr". It isn't
compiling because it doesn't seem the function exists within Cygwin's C
library. Is there a replacement method or an additional library I could
use for this?

Thanks!

Rob

:)
:-}
;->


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]