replace_copy

Syntax:

    #include <algorithm>
    output_iterator replace_copy( input_iterator start, input_iterator end, output_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