note 28824 added to function.strcspn

From: Date: Sat, 25 Jan 2003 01:09:54 +0000
Subject: note 28824 added to function.strcspn
Groups: php.notes 
Request: Send a blank email to php-notes+get-42712@lists.php.net to get a copy of this message
this function checks if a string contains special characters excluding "_" and "-". you can also easy customise it. function vstr2 ($str) { // if ( strcspn($str, '~`!@#$%^&*()+{}[]| \\:;<>,./?+=' ) != strlen($str) ) return false; if ( !ctype_print ($str) ) return false; return true; } -- http://www.php.net/manual/en/function.strcspn.php http://master.php.net/manage/user-notes.php?action=edit+28824 http://master.php.net/manage/user-notes.php?action=delete+28824 http://master.php.net/manage/user-notes.php?action=reject+28824

« previous php.notes (#42712) next »