[GRASS-dev] G_strcasecmp() in GRASS 7

Martin Landa landa.martin at gmail.com
Sat Jul 23 02:40:13 EDT 2011


Hi,

2011/7/23 Glynn Clements <glynn at gclements.plus.com>:
>> do we need our own G_strcasecmp()? Bearing in mind that libc offers
>> strcasecmp() and strncasecmp().
>
> Windows doesn't have these (it has stricmp and/or strcmpi instead).

recently I have used strncasecmp() in db/ogr/execute.c and it's
compile on Windows without any problem.

> Also, strcasecmp() is affected by the locale (LC_CTYPE), while
> G_strcasecmp() isn't.

OK, in this case I would suggest to implement G_strncasecmp().

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-dev mailing list