strncmp (string1, string2, length) strnicmp (string1, string2, length)
The first string.
The second string.
The maximum length of the comparison.
An integer < 0 if string1 is lexically less than string2 to the given length; 0 if the two strings are equal up to the given length; and an integer > 0 if string1 is lexically greater than string2 up to the given length.
The strncmp function compares two strings and returns a numeric result indicating whether the first string is lexically less than, greater than, or equal to the second string. The comparison will carry on for not more than length characters of the shorter string. The strnicmp function is the case-insensitive version of strncmp.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.