Add #replace function.