danielstjules / Stringy

A PHP string manipulation library with multibyte support
MIT License
2.46k stars 216 forks source link

Add replace() method #185

Open shadowhand opened 6 years ago

shadowhand commented 6 years ago

It would be nice to have a generic replace() method:

$s = $s->replace('foo', 'bar');

Expected signature:

function replace(string $search, string $replace, int $limit = -1);