- 博客(2)
- 资源 (2)
- 收藏
- 关注
转载 C++/STL std::string 的用法
1.toupper, tolower#include #include #include #include #include #include #include string s("heLLo");transform(s.begin(), s.end(), s.begin(), toupper);cout transform(s.begin(), s.end(), s.begin(), tolower);cout 2.trimstring s(" hello "); s.erase(0, s.
2011-02-23 16:39:00 795
转载 标准C++库string及STL相关函数
<br />一.标准C++库字符串类std::string的用法<br />#include<string><br />std::string s1;<br />std::string s3(s2);<br />std::string s2("this is a string");<br />begin 得到指向字符串开头的Iterator<br />end 得到指向字符串结尾的Iterator<br />rbegin 得到指向反向字符串开头的Iterator<br />
2011-02-23 16:25:00 413
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人