Hi,

2012/7/15 Paul Dragoonis <dragoo...@gmail.com>:
> Hey,
>
> I'm proposing to add a new function str_replace_limit, this will be
> identical to str_replace() with one key difference, you can specify
> how many times you want the replace to occur.
>
> Currently this isn't possible with any functions in the
> /ext/standard/string.c stack, the only easy workaround is using
> preg_replace() which requires of course the pcre library and regex
> patterns.
>
> I would have added this as a 4th param to str_replace(), but it
> already has a 4th by-ref param to tell you how many times it done the
> replacement.
>
> mixed str_replace_limit ( mixed $search , mixed $replace , mixed
> $subject [, int $limit ] )
>
> Thoughts?
>

Surely a 5th param is preferred.

-- 
Regards,
Felipe Pena

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to