lpcware

BUG - string.h library

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by brownm on Fri Apr 01 21:13:55 MST 2016
Hi there

I'm trying to use the string.h library function - strncasecmp I think that there is a bug in it.



static const char *mon[12] = {
"January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"
};


void mkb_test(void){
size_t len;
len = strlen(mon[5]);
if (strncasecmp(mon[5], "dec 2011", len) == 0){
printf ("how does that match");

}

}



Any thoughts are appreciated.

Regards
Marshall

Outcomes