+/**
+ * Split a string into tokens at occurences of the separator.
+ *
+ * @param[in] text The input string to split.
+ * @param[in] separator The delimiter between tokens.
+ *
+ * @return A vector of broken down tokens.
+ */
+vector<string> split_string(string text, string separator)
+{
+ vector<string> result;
+ size_t pos;
+
+ while ((pos = text.find(separator)) != std::string::npos) {
+ result.push_back(text.substr(0, pos));
+ text = text.substr(pos + separator.length());
+ }
+ result.push_back(text);
+
+ return result;
+}
+