replace

  审阅range中的每个元素,把old_value替换为new_value

template <class ForwardIterator,class T>
void replace(ForwardIterator first,ForwardIterator last,const T& old_value,const T& new_value);

replace_if

  把pred(*i)为true的替换为new_value,为false的不影响

template <class ForwardIterator,class Predicate,class T>
void replace(ForwardIterator first,ForwardIterator last,Predicate pred,const T& new_value);

replace_copy

  为replace的变形

  1. 将元素复制到result中
  2. 先copy之后再replace
template <class ForwardIterator,class OutputIterator,class T>
OutputIterator replace_copy(ForwardIterator first,ForwardIterator last,OutputIterator result,const T& old_value,const T& new_value);

replace_copy_if

  为replace_if的变形

  1. 先copy之后再replace_if
  2. 不能作用于单一的(就地)replace
template <class ForwardIterator,class OutputIterator,class Predicate,class T>
OutputIterator replace_copy_if(ForwardIterator first,ForwardIterator last,OutputIterator result,Predicate pred,const T& new_value);

最新文章

  1. 关于前端CSS预处理器Sass的小知识!
  2. 轻松自动化---selenium-webdriver(python) (六)
  3. self&amp;super
  4. Position a child div relative to parent container in CSS: [设置 子DIV位置 跟 父DIV相关联]
  5. jqgrid单元格中增加按钮
  6. CentOS7_RAID5_LVM_SAMBA
  7. Word Search [LeetCode]
  8. python字典copy()方法
  9. web切图的几个快捷键及总结
  10. 【DP】捡苹果
  11. Centos环境下安装mongoDB
  12. 从码农到技术总监分享Leader经验
  13. C++算法之大数加法计算的代码
  14. C#通过COM组件操作IE浏览器(三):了解IHTMLDocument2
  15. Java基础(变量数&amp;常量&amp;据类型&amp;类型转换)
  16. PHP工程师笔试题
  17. 设置tab标签页 遮挡部分
  18. nyoj 数独
  19. poj3680
  20. libevent文档学习(一)多线程接口和使用

热门文章

  1. suse_linux 11 sp3 安装 was7
  2. 51nod1009
  3. 玩转 React 【第03期】:邂逅 React 组件
  4. Java学习笔记13(equals()方法;toString()方法)
  5. 排序jq
  6. Spring架构-01-微服务架构
  7. grep命令相关用法
  8. Java中的容器 I————浅谈List
  9. Python之路PythonThread,第三篇,进程3
  10. SPI有关CPOL和CPHA的时序图