memcmp
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <string.h> 中定义
|
||
| int memcmp( const void* lhs, const void* rhs, size_t count ); |
||
比较
count和lhs指出,第一rhs字符的对象。比较是字典.原文:
Compares the first
count characters of the objects pointed to by lhs and rhs. The comparison is done lexicographically.目录 |
[编辑] 参数
| lhs, rhs | - | 指向的内存缓冲区进行比较
原文: pointers to the memory buffers to compare |
| count | - | 检查的字节数
|
[编辑] 返回值
负值
lhs是“小于”rhs.原文:
Negative value if
lhs is less than rhs.0如果
lhs是“等于”rhs.正值
lhs是“大于”rhs.原文:
Positive value if
lhs is greater than rhs.[编辑] 示例
| 本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
| 比较两个字符串 (函数) | |
| 一定量的两个字符串的字符进行比较 原文: compares a certain amount of characters of two strings (函数) | |
| C++ documentation for memcmp
| |