replace_copy

Syntax:

    #include <algorithm>
    iterator replace_copy( iterator start, iterator end, iterator result, const TYPE& old_value, const TYPE& new_value );

The replace_copy() function copies the elements in the range [start,end) to the destination result. Any elements in the range that are equal to old_value are replaced with new_value.

Related Topics: replace