There is no 'replacestring' in the file you posted.
Post a minimum example here that reproduces the problem. Do not attach files, post the code using code tags.