expressions: Implement the REPLACE string function.