2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <exec/types.h>
9 #include <aros/libcall.h>
12 /*****************************************************************************
15 #include <proto/utility.h>
17 AROS_LH3(LONG
, Strnicmp
,
20 AROS_LHA(CONST_STRPTR
, string1
, A0
),
21 AROS_LHA(CONST_STRPTR
, string2
, A1
),
22 AROS_LHA(LONG
, length
, D0
),
25 struct UtilityBase
*, UtilityBase
, 28, Utility
)
28 Compares two strings treating lower and upper case characters
29 as identical up to a given maximum number of characters.
32 string1, string2 - The strings to compare.
33 length - maximum number of characters to compare.
36 <0 if string1 < string2
37 ==0 if string1 == string2
38 >0 if string1 > string2
52 *****************************************************************************/
57 /* 0 characters are always identical */
61 /* Loop as long as the strings are identical and valid. */
64 /* Get characters, convert them to lower case. */
65 c1
=ToLower (*string1
++);
66 c2
=ToLower (*string2
++);
67 }while(c1
==c2
&&c1
&&--length
);
70 return (LONG
)c1
-(LONG
)c2
;