Replacestring will just replace whatever characters mentioned and retain the other characters. for E.g if your source value has test?test - output will be testtest. no boolean is required.
As per his requirement some time field will have ? or values.. so it should work.