C++ Standard Library replace_if() Sample

Description

replace_if() replaces values in a sequence, according to a user-defined predicate. Any value that matches the predicate is replaced with a specified value.

Declaration

	template <class For, class Pred, class T>
	    void replace_if(For, For, Pred, const T&);

Concept

The example sets up a list of four C-style strings, and then goes through and replaces any of the strings that start with the letter a.

Supported
Supported
Supported