How to use boost split to split a string and ignore empty values?
问题 I am using boost::split to parse a data file. The data file contains lines such as the following. data.txt 1:1~15 ASTKGPSVFPLAPSS SVFPLAPSS -12.6 98.3 The white space between the items are tabs. The code I have to split the above line is as follows. std::string buf; /*Assign the line from the file to buf*/ std::vector<std::string> dataLine; boost::split( dataLine, buf , boost::is_any_of("\t "), boost::token_compress_on); //Split data line cout << dataLine.size() << endl; For the above line of