字符串截词.substr(begin,end) 取值范围:[begin,end) ex: string a="01234567"; a=a.substr(0,2); cout<<a<<endl;//output:01