Translations of this page?:

strncmp

语法:

    #include <cstring>
    int strncmp( const char *str1, const char *str2, size_t count );

strncmp() 比较 str1 和 str2 至多count个字符。返回值如下:

返回值 解释
小于零 str1 小于 str2
等于零 str1 等于 str2
大于零 str1 大于 str2

如果有字符串少于count个字符,比较将在遇到第一个空终止符后停止。

相关主题: strchr, strcmp, strcpy, strlen, strncat, strncpy

 
• • • SitemapRecent changesRSScc