delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MimeOLE: | Produced By Microsoft Exchange V6.0.6177.0 |
content-class: | urn:content-classes:message |
MIME-Version: | 1.0 |
Subject: | RE: strcasestr not found |
Date: | Sat, 8 Jun 2002 23:14:20 -0700 |
Message-ID: | <7C083876C492EB4BAAF6B3AE0732970E075841BD@red-msg-08.redmond.corp.microsoft.com> |
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
From: | "Stephan Mueller" <smueller AT microsoft DOT com> |
To: | "Robert Mark Bram" <relaxedrob AT optushome DOT com DOT au>, |
"Cygwin" <cygwin AT cygwin DOT com> | |
X-OriginalArrivalTime: | 09 Jun 2002 06:14:20.0442 (UTC) FILETIME=[E48A37A0:01C20F7C] |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id g596EWV31732 |
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 AT optushome DOT com DOT 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |