#if 0
vector<string>split(const string &s,const string &seperator)
{
vector<string>result;
int seplen = seperator.size();
int pos = 0;
int index = -1;
while(-1 !=(index = s.find(seperator,pos)))
{
result.push_back(s.substr(pos,index-pos));
pos = index+seplen;
}
string laststring = s.substr(pos);
if(!laststring.empty())
result.push_back(laststring);
return result;
}
int main()
{
string s = "qq,sd,adscc,sdefde,sadse,adsdece";
string sep = ",";
vector<string>v = split(s,sep);
for(vector<string>::size_type i = 0;i!=v.size();++i)
cout<<v[i]<<" ";
cout<<endl;
}
#endif
#if 0
int main()
{
char buf[] = "hello-I-am-a-girl*I-like*listen-music";
char *sep = "-*";
char *temp = strtok(buf,sep);
while(temp)
{
printf("%s ",temp);
temp = strtok(NULL,sep);
}
printf("\n");
return 0;
}
#endif