...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::algorithm::replace_first — Replace first algorithm.
// In header: <boost/algorithm/string/replace.hpp> template<typename SequenceT, typename Range1T, typename Range2T> void replace_first(SequenceT & Input, const Range1T & Search, const Range2T & Format);