Returns
A negative number if the first string is ordinally less than the second string according to the ASCII character set, a positive number if the first string is greater than the second, and zero if the two strings are exactly equal.
Description
These functions can be used as comparison functions for sort and insert. stricmp performs the same function as strcmp, but alphabetic characters are compared without regard to case. That is, "A" and "a" are considered equal by stricmp, but different by strcmp.
简单来说,strcmp区分大小写而stricmp不区分大小写而已。
本文介绍了字符串比较函数strcmp和stricmp的区别。strcmp区分大小写进行比较,而stricmp则忽略大小写差异。这两种函数常用于排序和插入操作中。
876

被折叠的 条评论
为什么被折叠?



