Boost C++ 库

...世界上最受推崇和设计精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu,《C++ 编码规范

函数模板 ierase_nth - Boost C++ 函数库
PrevUpHomeNext

函数模板 ierase_nth

boost::algorithm::ierase_nth — 删除第 n 个算法。

提要

// In header: <boost/algorithm/string/erase.hpp>


template<typename SequenceT, typename RangeT> 
  void ierase_nth(SequenceT & Input, const RangeT & Search, int Nth, 
                  const std::locale & Loc = std::locale());

描述

移除输入字符串中第 N 次出现的子字符串。输入序列将被就地修改。搜索不区分大小写。

参数

输入

一个输入字符串

搜索

要搜索的子字符串。

第 N 个

要替换的匹配项的索引。索引从 0 开始。对于负的 N,匹配项将从字符串末尾开始计数。

位置

用于不区分大小写比较的区域设置


PrevUpHomeNext