Java has a convenient split method:
String str = "The quick brown fox";
String[] results = str.split(" ");
Is there an easy way to do this in C++?
c++splitstringtokenize
Java has a convenient split method:
String str = "The quick brown fox";
String[] results = str.split(" ");
Is there an easy way to do this in C++?
Best Answer
The Boost tokenizer class can make this sort of thing quite simple:
Updated for C++11: