[8.x] Improvements to the Stringable::replace()
method
#37186
Merged
Stringable::replace()
method
#37186