zoukankan      html  css  js  c++  java
  • STL: replace

    replace

    Examines each element in a range and replaces it if it matches a specified value.

     
    template<class ForwardIterator, class Type> 
       void replace( 
          ForwardIterator _First,  
          ForwardIterator _Last, 
          const Type& _OldVal,  
          const Type& _NewVal 
       );

    replace_if

    Examines each element in a range and replaces it if it satisfies a specified predicate.

    template<class ForwardIterator, class Predicate, class Type> 
       void replace_if( 
          ForwardIterator _First,  
          ForwardIterator _Last, 
          Predicate _Pred,  
          const Type& _Val 
       );

    replace_copy

    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 InputIterator, class OutputIterator, class Type> 
       OutputIterator replace_copy( 
          InputIterator _First,  
          InputIterator _Last,  
          OutputIterator _Result, 
          const Type& _OldVal,  
          const Type& _NewVal 
       );

    replace_copy_if

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

    template<class InputIterator, class OutputIterator, class Predicate, class Type> 
       OutputIterator replace_copy_if( 
          InputIterator _First,  
          InputIterator _Last,  
          OutputIterator _Result,  
          Predicate _Pred,  
          const Type& _Val 
       );
  • 相关阅读:
    docker安装kafka
    Prometheus警报
    MongoDB介绍
    SpringMvc中几个注解
    无DNS安装VCSA
    互联网本质
    什么是领导力
    58沈剑_一分钟专栏
    以数据库思维理解区块链
    区块链的4个实际应用
  • 原文地址:https://www.cnblogs.com/freewater/p/2953620.html
Copyright © 2011-2022 走看看