memcmp.c
来自「一套接口」· C语言 代码 · 共 16 行
C
16 行
#include <string.h>/*lint -e613memcmp is defined here because some vendors don't implementit, strcmp, or strncmp correctly; they must treat the bytesas unsigned chars.*/int memcmp(const void *s1, const void *s2, size_t n) { const unsigned char *cs1 = s1, *cs2 = s2; for ( ; n-- > 0; cs1++, cs2++) if (*cs1 != *cs2) return *cs1 - *cs2; return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?