boost::algorithm::ifind_all — 查找全部算法 ( 不区分大小写 )
// In header: <boost/algorithm/string/split.hpp> template<typename SequenceSequenceT, typename Range1T, typename Range2T> SequenceSequenceT & ifind_all(SequenceSequenceT & Result, Range1T && Input, const Range2T & Search, const std::locale & Loc = std::locale());
该算法在输入中查找搜索字符串的所有出现位置。每个匹配项都被复制并作为新元素添加到输出容器。因此,结果容器必须能够保存匹配项的副本(以兼容的结构,如 std::string),或对其的引用(例如,使用迭代器范围类)。这样的容器的例子有 std::vector<std::string>
或 std::list<boost::iterator_range<std::string::iterator>>
搜索不区分大小写。
![]() |
注意 |
---|---|
结果容器的先前内容将被覆盖。 |
![]() |
注意 |
---|---|
此函数提供强异常安全保证 |
参数 |
|
||||||||
返回 |
结果的引用 |