Changeset 618


Ignore:
Timestamp:
Jul 16, 2015, 3:29:09 PM (9 years ago)
Author:
guerin
Message:

utils: introduce _strcmp()

Location:
soft/giet_vm/giet_common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_common/utils.c

    r594 r618  
    602602    while ( string[i] != 0 ) i++;
    603603    return i;
     604}
     605
     606///////////////////////////////////////
     607unsigned int _strcmp( const char * s1,
     608                      const char * s2 )
     609{
     610    while (1)
     611    {
     612        if (*s1 != *s2) return 1;
     613        if (*s1 == 0)   break;
     614        s1++, s2++;
     615    }
     616    return 0;
    604617}
    605618
  • soft/giet_vm/giet_common/utils.h

    r594 r618  
    153153extern unsigned int _strlen( char* str);
    154154
     155extern unsigned int _strcmp(const char* s1,
     156                            const char* s2);
     157
    155158extern unsigned int _strncmp(const char*  s1,
    156159                             const char*  s2,
Note: See TracChangeset for help on using the changeset viewer.