/*
* The sign of a nonzero value returned by the comparison functions is
* determined by the sign of the difference between the values of the first
* pair of characters (both interpreted as unsigned char) that differ in the
* objects being compared.
*/
extern _ARMABI int memcmp(const void * /*s1*/, const void * /*s2*/, size_t /*n*/) __attribute__((__nonnull__(1,2)));
/*
* compares the first n characters of the object pointed to by s1 to the
* first n characters of the object pointed to by s2.
* Returns: an integer greater than, equal to, or less than zero, according
* as the object pointed to by s1 is greater than, equal to, or
* less than the object pointed to by s2.
*/
extern _ARMABI int strcmp(const char * /*s1*/, const char * /*s2*/) __attribute__((__nonnull__(1,2)));
/*
* compares the string pointed to by s1 to the string pointed to by s2.
* Returns: an integer greater than, equal to, or less than zero, according
* as the string pointed to by s1 is greater than, equal to, or
* less than the string pointed to by s2.
*/
extern _ARMABI int strncmp(const char * /*s1*/, const char * /*s2*/, size_t /*n*/) __attribute__((__nonnull__(1,2)));
/*
* compares not more than n characters (characters that follow a null
* character are not compared) from the array pointed to by s1 to the array
* pointed to by s2.
* Returns: an integer greater than, equal to, or less than zero, according
* as the string pointed to by s1 is greater than, equal to, or
* less than the string pointed to by s2.
*/
extern _ARMABI int strcasecmp(const char * /*s1*/, const char * /*s2*/) __attribute__((__nonnull__(1,2)));
/*
* compares the string pointed to by s1 to the string pointed to by s2,
* case-insensitively as defined by the current locale.
* Returns: an integer greater than, equal to, or less than zero, according
* as the string pointed to by s1 is greater than, equal to, or
* less than the string pointed to by s2.
*/
extern _ARMABI int strncasecmp(const char * /*s1*/, const char * /*s2*/, size_t /*n*/) __attribute__((__nonnull__(1,2)));
/*
* compares not more than n characters (characters that follow a null
* character are not compared) from the array pointed to by s1 to the array
* pointed to by s2, case-insensitively as defined by the current locale.
* Returns: an integer greater than, equal to, or less than zero, according
* as the string pointed to by s1 is greater than, equal to, or
* less than the string pointed to by s2.
*/
C库常用函数
最新推荐文章于 2024-05-13 20:35:07 发布