std::memcmp

来自cppreference.com
< cpp‎ | string‎ | byte
2013年7月2日 (二) 12:21P12bot讨论 | 贡献的版本

在标头 <cstring> 定义
int memcmp( const void* lhs, const void* rhs, std::size_t count );
。比较countlhs指出,第一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 -
。检查的字节数。
原文:
number of bytes to examine
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。

===。 返回值。===

。负值lhs是“小于”rhs.
原文:
Negative value if lhs is less than rhs.
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。
0如果lhs是“等于”rhs.
原文:
0 if lhs is equal to rhs.
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。
。正值lhs是“大于”rhs.
原文:
Positive value if lhs is greater than rhs.
文本通过谷歌翻译机器翻译。
你可以帮忙校正和验证翻译。点击此处查看指示。

。为例。

。另请参阅。

比较两个字符串
(函数) [编辑]
比较两个字符串的一定量字符
(函数) [编辑]
memcmp 的 C 文档