How does replace.() work on a string vector containing missing?

more than anything else, it is a curiosity that comes from the attempt to answer this
request without using flow control