Copy `s` as a mutable string before: `MCStringFindAndReplaceChar` takes a mutable string as input and modifies it, which you don't want to happen to `s`.