Any reason you can't use str_replace here? Is the overhead of String::insert() worth it?