Changeset 14444 for titan/titan/global.h


Ignore:
Timestamp:
03/06/12 18:24:22 (12 years ago)
Author:
nit
Message:

[titan] implement non case sensitive strstr (ostrstrcase) for epgsearch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r14382 r14444  
    46964696}
    46974697
     4698char* ostrstrcase(char* str, char* sub)
     4699{
     4700        size_t len = 0;
     4701
     4702        if(str == NULL || sub == NULL) return NULL;
     4703
     4704        len = strlen(sub);
     4705        while(*str)
     4706        {
     4707                if(toupper(*str) == toupper(*sub) && strncasecmp(str, sub, len) == 0)
     4708                        return str;     
     4709                ++str;
     4710        }
     4711        return NULL;
     4712}
     4713
    46984714#endif
Note: See TracChangeset for help on using the changeset viewer.