replace_copy_if

Syntax:

    #include <algorithm>
    output_iterator replace_copy_if( input_iterator start, input_iterator end, output_iterator result, Predicate p, const TYPE& new_value );

The replace_copy_if() function copies the elements in the range [start,end) to the destination result. Any elements for which the predicate p is true are replaced with new_value.

Related Topics: replace