Implement Option::replace in the core library
#52003
Merged
Option::replace in the core library
#52003