AzKay Posted February 2, 2009 Share Posted February 2, 2009 in C++; I used; vector <string> split(string line, string delims){ string::size_type bi, ei; vector<string> words; bi = line.find_first_not_of(delims); while(bi != string::npos){ ei = line.find_first_of(delims, bi); if(ei == string::npos) ei = line.length(); words.push_back(line.substr(bi, ei-bi)); bi = line.find_first_not_of(delims, ei); } return words; } Though, doesnt seem to be backwards compatible. So, ive been googling but havnt came up with anything. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Bowmore Posted February 2, 2009 Share Posted February 2, 2009 Have a look at strtok and wcstok "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now