diff options
Diffstat (limited to 'libs/pbd3/strsplit.cc')
-rw-r--r-- | libs/pbd3/strsplit.cc | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/libs/pbd3/strsplit.cc b/libs/pbd3/strsplit.cc deleted file mode 100644 index 7f29a77887..0000000000 --- a/libs/pbd3/strsplit.cc +++ /dev/null @@ -1,41 +0,0 @@ -#include <pbd/strsplit.h> - -using namespace std; - -void -split (string str, vector<string>& result, char splitchar) -{ - string::size_type pos; - string remaining; - string::size_type len = str.length(); - int cnt; - - cnt = 0; - - if (str.empty()) { - return; - } - - for (string::size_type n = 0; n < len; ++n) { - if (str[n] == splitchar) { - cnt++; - } - } - - if (cnt == 0) { - result.push_back (str); - return; - } - - remaining = str; - - while ((pos = remaining.find_first_of (':')) != string::npos) { - result.push_back (remaining.substr (0, pos)); - remaining = remaining.substr (pos+1); - } - - if (remaining.length()) { - - result.push_back (remaining); - } -} |