
杂谈
码院
这个作者很懒,什么都没留下…
展开
-
C++中string类的成员函数find_first_not_of()
C++中string类的成员函数find_first_not_of()函数原型: #include size_type find_first_not_of(const string &str,size_type index =0 )const; size_type find_first_not_of(const Char* str,size_type i原创 2012-08-10 20:22:52 · 5024 阅读 · 0 评论 -
C++中substr函数的用法
C++中substr函数的用法#include#includeusing namespace std;main(){string s("12345asdf");string a=s.substr(0,5); //获得字符串s中 从第0位开始的长度为5的字符串//默认时的长度为从开始位置到尾cout}输出结果为:12345原创 2012-08-10 20:24:03 · 148067 阅读 · 4 评论