strcmp, stricmp — compare strings.

来源:互联网 发布:淘宝外包服务 编辑:程序博客网 时间:2024/05/19 17:24

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 insertstricmp 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不区分大小写而已。