Added a replaceCharAt function to String