src/StringFix.cpp
/**
    * Splits a string into tokens. Tokens are split after every matched character in the delimeters string
    * @param delimiters : any matching character with the string will create a new token
    * @param stringToSplit
    * @return vector of tokens
    */
Splits a string into tokens. Tokens are split after every matched character in the delimeters string
@param delimiters : any matching character with the string will create a new token
@param stringToSplit
@return vector of tokens
Splits a string into tokens . Tokens are split after every matched character in the delimeters string @param delimiters : any matching character with the string will create a new token @param stringToSplit @return vector of tokens
std::vector<std::string> split(const std::string& delimiters, const std::string& stringToSplit) {
      using namespace std;
      string::size_type start = stringToSplit.find_first_not_of(delimiters, 0);
      string::size_type stop = stringToSplit.find_first_of(delimiters, start);
      std::vector<std::string> tokens;
      while (string::npos != stop || string::npos != start) {
         tokens.push_back(stringToSplit.substr(start, stop - start));
         start = stringToSplit.find_first_not_of(delimiters, stop);
         stop = stringToSplit.find_first_of(delimiters, start);
      }
      return tokens;
   }
std :: vector < std :: string > split ( const std :: string & delimiters , const std :: string & stringToSplit ) { using namespace std ; string :: size_type start = stringToSplit . find_first_not_of ( delimiters , 0 ) ; string :: size_type stop = stringToSplit . find_first_of ( delimiters , start ) ; std :: vector < std :: string > tokens ; while ( string :: npos != stop || string :: npos != start ) { tokens . push_back ( stringToSplit . substr ( start , stop - start ) ) ; start = stringToSplit . find_first_not_of ( delimiters , stop ) ; stop = stringToSplit . find_first_of ( delimiters , start ) ; } return tokens ; }
Splits a string into tokens.
Splits a string into tokens .
// Skip all the text until the first delimiter is found