note 14440 added to function.strncasecmp.php
| From: | me_temporaire1 at club-internet dot fr | Date: | Tue, 31 Jul 2001 14:18:24 +0000 |
| Subject: | note 14440 added to function.strncasecmp.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16102@lists.php.net to get a copy of this message | ||
I suggest to use more adapted functions names : "strcasecmp" doesn't indicate wether
it provides a case *sensitive* or case *insensitive* function. Similarly, strncase could be
understood as "str No case sensitive or insensitive", as the opposite of strcasecmp. A
user is obliged to have a look at the function documentation, just to know its general purpose.
Maybe a simple parameter to the strcmp function could indicate wether the comparison should be case
sensitive or insensitive ? Similarly, an optional parameter could indicate the length of the strings
to be compared.
http://www.php.net/manual/en/function.strncasecmp.php