Extend string replacement