From:             [EMAIL PROTECTED]
Operating system: all
PHP version:      4.1.2
PHP Bug Type:     Feature/Change Request
Bug description:  feature request for str_replace_first

function str_replace_first($search, $replace, $subject)
{
        $retval = $subject;
        $pos = strpos($subject,$search);
        if ($pos !== false) {
                $retval =
substr_replace($subject,$replace,$pos,strlen($search));
        }
        return $retval;
}


the above function would be useful in the str_functions, would probably be
faster in c.. and i bet some people use something similar atleast once in
their life :D
-- 
Edit bug report at http://bugs.php.net/?id=15941&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15941&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15941&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15941&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15941&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15941&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15941&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15941&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15941&r=submittedtwice

Reply via email to