Changeset 2dd7288 in mainline for uspace/lib/libc/generic/string.c


Ignore:
Timestamp:
2008-08-10T09:11:44Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d2e9c47
Parents:
5749372
Message:

Add tolower() and stricmp().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/string.c

    r5749372 r2dd7288  
    147147       
    148148        return (a[c] - b[c]);
    149        
    150149}
    151150
     
    159158        return ( c < n ? a[c] - b[c] : 0);
    160159       
     160}
     161
     162int stricmp(const char *a, const char *b)
     163{
     164        int c = 0;
     165       
     166        while (a[c] && b[c] && (!(tolower(a[c]) - tolower(b[c]))))
     167                c++;
     168       
     169        return (tolower(a[c]) - tolower(b[c]));
    161170}
    162171
Note: See TracChangeset for help on using the changeset viewer.