note 94109 added to function.strspn
| From: | Anonymous at osu1 dot php dot net | Date: | Fri, 16 Oct 2009 17:40:43 +0000 |
| Subject: | note 94109 added to function.strspn | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161815@lists.php.net to get a copy of this message | ||
Another way to describe strspn() is by analogy to regular expressions:
<?php
// where ... is the $mask of characters to match
preg_match("/^[ ... ]*/", substr($subject, $start, $length) );
?>
strspn() returns the number of characters matched, with zero indicating no match whatsoever, and
$length indicating a complete match. Any other value indicates a partial match, which may or may
not be useful depending on your needs.
----
Server IP: 192.41.40.227
Probable Submitter: 67.237.228.46
----
Manual Page -- http://www.php.net/manual/en/function.strspn.php
Edit -- https://master.php.net/note/edit/94109
Del: integrated -- https://master.php.net/note/delete/94109/integrated
Del: useless -- https://master.php.net/note/delete/94109/useless
Del: bad code -- https://master.php.net/note/delete/94109/bad+code
Del: spam -- https://master.php.net/note/delete/94109/spam
Del: non-english -- https://master.php.net/note/delete/94109/non-english
Del: in docs -- https://master.php.net/note/delete/94109/in+docs
Del: other reasons-- https://master.php.net/note/delete/94109
Reject -- https://master.php.net/note/reject/94109
Search -- https://master.php.net/manage/user-notes.php