As we know, we can use copy to split a string and then insert the tokens into a vector like this,

Code:
vector<string> vec;
string iss;

copy(istream_iterator<string>(iss), istream_iterator<string>(), back_inserter< vector<string> >(vec) );
However, the method above works only when the string is separated by white space. What if the string is separated by some delimiter other than white space? Thanks.