int uglystrieq( const char * l, const char * r ) { while(*l&&*r&&(*l++|32)==(*r++|32));return *l--||*r--||(*l|32)!=(*r|32); }
Compare the equivalence of two strings. Case insensitive.
[Edit]
This implementation while crash when passing a 0-lengthed string. Another version:
[Edit]
This implementation while crash when passing a 0-lengthed string. Another version:
int _(const char*l,const char*O) { return ((*l|32)-(*O|32))?1:*l?_(l+1,O+1):0; }
我吐了 ...Orz
回覆刪除來搞 IOCCC 啊 XD
回覆刪除囧
回覆刪除