Re: Feature Request #5919 case-insensitive version of str_replace()

From: Date: Wed, 29 Jan 2003 22:05:59 +0000
Subject: Re: Feature Request #5919 case-insensitive version of str_replace()
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-93780@lists.php.net to get a copy of this message
I'd tip my hat towards implementing it. Pollita has a good point on consistency and for those who don't know regex's. On Wed, 29 Jan 2003, Sara Golemon wrote: > >> I may be wrong since I haven't profiled this, but my understanding is > >> that str_replace is much faster than doing either of the regex > >> replacements. For that reason alone, there is a use for it. > > > > Normally it would be quite faster, however once case sensitivity is > > added to the mix I believe the speed difference would be minimal. > > > I don't even see the speed difference as an issue as much as (A) > simplicity for the user who hasn't figured out regex yet, (B) consistency > (we have 'i' versions of most other string functions, why not this one?) > > The parameter accepting still needs to be fixed though, I copied most of > the str_ireplace code from str_replace and forgot to clean that section up > and make it nicer. I'll save that for *if* a quorum can be reached to > include it at all. > > On a related topic, the 'boyer' option of str_replace isn't even > documented. That alternate method of performing str_replaces look like > it's a bit more efficient (no benchmarkes atm) but I'm wondering if > there's a specific reasons why it wasn't documented yet. > > -Pollita > > > > > >---------------------------------------------------------------< Dan Kalowsky "I'll walk a thousand miles just http://www.deadmime.org/~dank to slip this skin." dank-nom@aps-deadmime.org - "Streets of Philadelphia", kalowsky@php.net Bruce Springsteen

« previous php.dev (#93780) next »