This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/lib/strcasestr.c

28 lines
368 B
C
Raw Normal View History

2001-08-17 05:46:24 +00:00
2002-06-30 12:48:44 +00:00
#include "../config.h"
2001-08-17 05:46:24 +00:00
#include "libs.h"
2002-06-30 12:48:44 +00:00
#include "memwatch.h"
2001-08-17 05:46:24 +00:00
#ifndef HAVE_STRCASESTR
char *strcasestr(char *a, char *b)
{
char *p,*max;
int l;
if (a && b) {
l=strlen(b);
max=a+strlen(a)-l;
for (p=a;p<=max;p++)
if (!strncasecmp(p,b,l)) return(p);
return((char *)0);
}
else {
return ((char *) 0);
}
}
#endif