Parse (split) a string in C++ using string delimiter (standard C++)
You can use the std::string::find() function to find the position of your string delimiter, then use std::string::substr() to get a token. Example: The find(const string& str, size_t pos = 0) function returns the position of the first occurrence of str in the string, or npos if the string is not found. The substr(size_t pos = 0, size_t n = npos) function returns a substring of the object, … Read more