
#include <string.h>
#include <limits.h>
#include <lcd.h>
char toupper(char c)
{
  if (c>='a' && c<='z')
    return (c-32);
  return c;
}
char * strcasestr(char *str2,char *str1)
{
  char *s1=str1;
  char *s2=str2;
  int inside=0;
//  char t,o;
  while (*s2!='\0')
    {
/*	    	lcd_clear_display();
		lcd_puts(0,1,s1);
		lcd_puts(0,2,s2);
		lcd_update();*/
//		sleep(5);
      if (toupper(*s1)==toupper(*s2))
	{
	  inside=1;
	  s1++;
	  s2++;
	  if (*s1=='\0')
	    break;
	}
      
      else
	{
	  inside=0;
	  s1=str1;
	  s2++;
	}
    }
  if (inside==1) 
  	return 1;
  return 0;
}

