2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
6 #include "extstrings.h"
8 UBYTE
capitalch(UBYTE ch
, UBYTE flags
) {
10 if ((flags
==0) || (flags
==1))
11 return (UBYTE
)((ch
>='a') && (ch
<='z') ? ch
-('a'-'A') : ch
);
13 return (UBYTE
)(((ch
>=224) && (ch
<=254) && (ch
!=247)) ||
14 ((ch
>='a') && (ch
<='z')) ? ch
-('a'-'A') : ch
);
17 // str2 is a BCPL string
18 LONG
noCaseStrCmp(const char *str1
, const char *str2
, UBYTE flags
, int maxlen
) {
23 if (((*str1
==0) || (length
==maxlen
)) && (i
==length
))
26 } while (capitalch(*str1
++,flags
)==capitalch(*str2
++,flags
));
30 LONG
StrCmp(CONST_STRPTR str1
, CONST_STRPTR str2
) {
33 if ((*str1
==0) && (*str2
==0))
35 } while ((*str1
++==*str2
++));
39 void StrCpyToBstr(const char *src
, char *dst
, int maxlen
) {
42 while (*src
&& (len
<maxlen
))