The two algorithms, std::replace and std::replace_if, will replace elements of a range that match the provided value or predicate with a new provided value.
Both algorithms are constexpr enabled (C++20) and have parallel (C++17) and range (C++20) variants.