文章标题
来源:互联网 发布:淘宝咬鲜花表情 编辑:程序博客网 时间:2024/06/09 15:54
std::remove_if
template<class ForwardIterator, class UnaryPredicate> ForwardIterator remove_if(ForwardIterator first,ForwardIterator last,UnaryPredicate pred);
作用:在algorithm头文件中,将[first,last)这个区域中的某些元素(对于pred方法为true的元素)移去,并返回一个iterator(指向新的区域的past-the-end元素)
这个方法并不会改变container的大小,只是会用紧接着的元素来替代那些要remove掉的元素
用法:
word.erase(std::remove_if(word.begin(),word.end(),ispunct),word.end());// remove the punctuation character in a string
阅读全文
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- python爬虫
- 在linux中将php-fpm配置成service
- spoj Query on a tree3/bzoj 1803(DFS序+主席树)
- 第二十九节上传下载
- LeetCode c语言- Count and Say
- 文章标题
- 编译vim8
- N名学生的成绩已在主函数中放入一个带头节点的链表结构中,h指向链表的头节点。 请编写函数fun,它的功能是:找出学生的最高分,由函数值返回。c语言编程【22题】
- 原生JS click onclick 区别
- python实现数据挖掘算法一
- jQuery中$符号的作用
- handlebars Block Expressions 块表达式 直接使用html标签拼接方式(使用较少)
- 1097: 树状数组1(快速求和计算)
- 浅谈数据的离散化