s.substr函数
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s ;
s = "abcdef";
string a = s.substr(0,4);
string b = s.substr();
string c = s.substr(3.4);
cout << a << endl << b << endl << c;
}
输出:
格式:
s.suber(begin , over)
特殊:
s.suber() 表示复制当前字符串