| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

stricstr

#include "sflstr.h"
char *
stricstr (
    const char *str1,
    const char *str2)

Synopsis

A case insensitive strstr. Returns a pointer to head of the str1. Submitted by Scott Beasley jscottb@infoave.com

Source Code - (sflstr.c)

{
   char *strtmp = (char *)str1;
   int iret = 1;

   ASSERT (str1);
   ASSERT (str2);

   while (*strtmp)
     {
       if (strlen (strtmp)>= strlen (str2))
         {
           iret = lexncmp (strtmp, str2, strlen (str2));
         }
       else
         {
           break;
         }

       if (!iret)
         {
           break;
         }

       strtmp++;
     }

   return !iret ? strtmp : (char *)NULL;
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation