目录

crend

描述 (Description)

它将const_reverse_iterator返回到反向结束。

声明 (Declaration)

以下是std :: string :: crend的声明。

const_reverse_iterator crend() const noexcept;

C++11

const_reverse_iterator crend() const noexcept;

参数 (Parameters)

没有

返回值 (Return Value)

它将const_reverse_iterator返回到字符串的反向末尾。

异常 (Exceptions)

永远不要抛出任何例外

例子 (Example)

在下面的示例中为std :: string :: crend。

#include <iostream>
#include <string>
int main () {
   std::string str ("IOWIKI");
   for (auto rit=str.crbegin(); rit!=str.crend(); ++rit)
      std::cout << *rit;
   std::cout << '\n';
   return 0;
}

样本输出应该是这样的 -

tnioP slairotuT
↑回到顶部↑
WIKI教程 @2018