1 #include <pbd/strsplit.h>
7 split (string str, vector<string>& result, char splitchar)
11 string::size_type len = str.length();
20 for (string::size_type n = 0; n < len; ++n) {
21 if (str[n] == splitchar) {
27 result.push_back (str);
33 while ((pos = remaining.find_first_of (':')) != string::npos) {
34 result.push_back (remaining.substr (0, pos));
35 remaining = remaining.substr (pos+1);
38 if (remaining.length()) {
40 result.push_back (remaining);
45 split (ustring str, vector<ustring>& result, char splitchar)
47 ustring::size_type pos;
49 ustring::size_type len = str.length();
58 for (ustring::size_type n = 0; n < len; ++n) {
59 if (str[n] == splitchar) {
65 result.push_back (str);
71 while ((pos = remaining.find_first_of (':')) != ustring::npos) {
72 result.push_back (remaining.substr (0, pos));
73 remaining = remaining.substr (pos+1);
76 if (remaining.length()) {
78 result.push_back (remaining);