共用方式為


replace_copy (STL/CLR)

Examines each element in a source range and replaces it if it matches a specified value while copying the result into a new destination range.

template<class _InIt, class _OutIt, class _Ty> inline
    _OutIt replace_copy(_InIt _First, _InIt _Last, _OutIt _Dest,
        const _Ty% _Oldval, const _Ty% _Newval);

Remarks

This function behaves the same as the STL function replace_copy. For more information, see replace_copy.

Requirements

Header: <cliext/algorithm>

Namespace: cliext

See Also

Concepts

algorithm (STL/CLR)