# include<iostream>
# include<string>
using namespace std;
void test01()
{
string str1 = "Hello";
string subStr = str1.substr(1, 3);
cout << "subStr:" << subStr << endl;
}
void test02()
{
string email = "Zhangsan@sina.com";
int pose = email.find("@");
string subStr = email.substr(0, pose);
cout << "subStr:" << subStr << endl;
}
int main()
{
test02();
system("pause");
return 0;
}