Added qPCR Validation design code
[htsworkflow.git] / htswanalysis / src / ValidationDesign / util.cpp
1 #ifndef UTIL_H
2 #define UTIL_H
3
4 #include <string>
5 #include <vector>
6
7 using namespace std;
8
9 void split (const string& text, const string& separators, vector<string>& words) {
10     size_t n     = text.length ();
11     size_t start = text.find_first_not_of (separators);
12
13     while (start < n) {
14         size_t stop = text.find_first_of (separators, start);
15         if (stop > n) stop = n;
16         words.push_back (text.substr (start, stop-start));
17         start = text.find_first_not_of (separators, stop+1);
18     }
19 }
20
21 #endif