Re: [PHP-DEV] strpos() suggestion

2002-11-14 Thread Andrey Hristov
3.0) but for your case strcspn() is the function. Andrey - Original Message - From: "Monte Ohrt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 14, 2002 12:02 AM Subject: [PHP-DEV] strpos() suggestion > Hi, > > I had a little problem to

Re: [PHP-DEV] strpos() suggestion

2002-11-13 Thread Monte Ohrt
en strpos() for it? > > Mike > > --- Original Message --- > From:Monte Ohrt <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Date: 13 Nov 2002 16:02:54 -0600 > Subject: [PHP-DEV] strpos() suggestion > > Hi, > >

Re: [PHP-DEV] strpos() suggestion

2002-11-13 Thread Mike Hall
Why couldn't you just strrev() the string and then strpos() for it? Mike --- Original Message --- From:Monte Ohrt <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Date:13 Nov 2002 16:02:54 -0600 Subject: [PHP-DEV] strpos() suggestion H

Re: [PHP-DEV] strpos() suggestion

2002-11-13 Thread Rasmus Lerdorf
The reason the functions are the way they are is because they directly mirror the underlying C functions. strrpos() calls strrchr() directly. But yes, some sort of new php_memnstr() based string searcher could probably be written. -Rasmus On 13 Nov 2002, Monte Ohrt wrote: > Hi, > > I had a litt

[PHP-DEV] strpos() suggestion

2002-11-13 Thread Monte Ohrt
Hi, I had a little problem to solve today, and couldn't find any easy way to do it without some extra steps slicing things up. What I wanted to do is take an arbitrary point in a string, and find the position of the first '[' on the left of it, and the first ']' on the right of it. Finding the '