note 14440 rejected and deleted from function.strncasecmp.php by philip

From: Date: Tue, 31 Jul 2001 15:02:23 +0000
Subject: note 14440 rejected and deleted from function.strncasecmp.php by philip
Groups: php.notes 
Request: Send a blank email to php-notes+get-16114@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.

« previous php.notes (#16114) next »