Req #13533 [Opn->Bgs]: new function
| From: | jani@php.net | Date: | Tue, 14 Dec 2010 11:33:17 +0000 |
| Subject: | Req #13533 [Opn->Bgs]: new function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156989@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=13533&edit=1
ID: 13533
Updated by: jani@php.net
Reported by: e at arix dot com
Summary: new function
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Linux
PHP Version: 4.0.6
Block user comment: N
Private report: N
New Comment:
preg_match() and PREG_OFFSET_CAPTURE helps. No need for yet another very
seldomly needed string function here.
Previous Comments:
------------------------------------------------------------------------
[2002-01-28 21:29:06] e at arix dot com
strset("This is a sample haystack", "ixbt") returns 3 because "i" was
found in the haystack.
strset("This is a sample haystack", "xbt") returns 0 because none of the
characters in "xbt" are found in the haystack
strset("This is a sample haystack", "xbts") returns 4 because it finds
it at the end of "this"
syntax: strset(haystack, needles)
essentially strset is a function that iterates through the needles
testing for the presence of each in the haystack.
------------------------------------------------------------------------
[2002-01-28 21:12:07] yohgaki@php.net
Could you explain more clearly with examples?
------------------------------------------------------------------------
[2001-10-03 17:20:09] e at arix dot com
would just like to suggest creating a new function (perhaps called
strset) that takes a haystack as its first parameter and a string of
needles i.e. a string each of whose characters will be looked for in the
haystack. finding ANY of those characters the function should return
the index.
would be very useful to have this.
- erick
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=13533&edit=1