string::crbegin string::crend
2024-09-05 05:29:33
const_reverse_iterator crbegin() const noexcept;
功能:crbegin是最后一个字符,crend第一个字符的前一个。迭代器向左移动是“+”,向右移动是“-”
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s1("hello");
string::const_reverse_iterator it = s1.crbegin();
cout << *it << endl;//o
it = s1.crend() - 1;//h
cout << *it << endl;
return 0;
}
最新文章
- 判断ie版本
- yourphp问题中心
- Android Wear 开发入门
- Bugzilla使用手册及解决方案
- OpenJDK 阅读源代码 Java 实现字节流输入类
- Setup and Configure the vsftpd server in CentOS 7 operation system
- C控制语句:循环
- hihocoder1391 Country
- Linux常用命令(第二版) --文件搜索命令
- CentOS 7下编译安装Boost_1_57_0
- kali中的postgres怎么连接
- Asp.net生命周期与Http协议
- PHP $_SERVER[&#39;SCRIPT_FILENAME&#39;] 与 __FILE__ 的区别
- day58
- fiddler手机端抓包
- 查询mssql 密码
- HDU-1003 Max Sum(动态规划,最长字段和问题)
- jsp / get 中文乱码问题
- Ubuntu 18.10安装Firefox 和 Google Chrome
- Reaction to 构造之法 of Software Engineering From The First Chapter toThe Fifth Chapter