MCPcopy Index your code
hub / github.com/MapServer/MapServer / strcasestr

Function strcasestr

mapstring.c:261–278  ·  view source on GitHub ↗

- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above co

Source from the content-addressed store, hash-verified

259 * SUCH DAMAGE.
260 */
261char *strcasestr(const char *s, const char *find)
262{
263 char c, sc;
264 size_t len;
265
266 if ((c = *find++) != 0) {
267 c = tolower((unsigned char)c);
268 len = strlen(find);
269 do {
270 do {
271 if ((sc = *s++) == 0)
272 return (NULL);
273 } while ((char)tolower((unsigned char)sc) != c);
274 } while (strncasecmp(s, find, len) != 0);
275 s--;
276 }
277 return ((char *)s);
278}
279#endif
280
281#ifdef NEED_STRDUP

Callers 15

FLTApplySimpleSQLFilterFunction · 0.85
msCaseReplaceSubstringFunction · 0.85
msPostGISParseDataFunction · 0.85
msPostGISBuildSQLSRIDFunction · 0.85
layerNeedsSubstitutionsFunction · 0.85
isValidTemplateFunction · 0.85
processShplabelTagFunction · 0.85
msWMSGetCapabilitiesFunction · 0.85
msWMSFeatureInfoFunction · 0.85
saveGdImageFunction · 0.85
saveGdImageBufferFunction · 0.85

Calls 1

strncasecmpFunction · 0.85

Tested by

no test coverage detected