I am new to VxWorks and would like to know if there is any function for
string comparison without case or I have to write one.
Thanks in advance
Samir
Speaking only for myself,
Joe Durusau
thanks
samir
>Yes, we have that but would like to have something which ignore case
>while comparison like strcasecmp. Do you have any idea?
>
>thanks
>samir
>
>Joe Durusau wrote:
>>
>> The standard C functions, strcmp and strncmp are available
>> in most versions of vxWorks.
HEELLLLOOOO! strncmp() What do you think it does? It isn't ANSI standard
though.
Samir,
I haven't found a case insenstive strcmp function in VxWorks.
Randy
Bruce <snap...@southwesternbell.net> wrote in message
news:39384385...@news.swbell.net...
int
strcasecmp(const char *s1, const char *s2) {
const char *t1 = (const char *)s1;
const char *t2 = (const char *)s2;
while (tolower(*t1) == tolower(*t2++))
if (*t1++ == '\0')
return (0);
return (tolower(*t1) - tolower(*--t2));
}
DaveG o_, o, o_ o_ o'
Programmer )-' /|' ),` ) ' (\ ^o Gymnast
Dancer >\ / > >\ >^' >\ >>' Hiker
da...@maker.com www.maker.com (508)621-0658
da...@mit.edu www.mit.edu/~daveg/ (617)216-4705