transform

The function transform is used to modify and copy elements of two ranges.

  template<class InputIterator, 
  class OutputIterator, class UnaryOperation>
  OutputIterator transform
  (InputIterator first, InputIterator last,
  OutputIterator result, UnaryOperation op);
  template<class InputIterator1, 
  class InputIterator2, class OutputIterator,
  class BinaryOperation>
  OutputIterator transform
  (InputIterator1 first1, InputIterator1 last1,
  InputIterator2 first2, OutputIterator result,
  BinaryOperation binary_op);
  
Remarks

The position of the last transformed element is returned.