diff options
Diffstat (limited to 'libs/pbd/strsplit.cc')
-rw-r--r-- | libs/pbd/strsplit.cc | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/libs/pbd/strsplit.cc b/libs/pbd/strsplit.cc index 342daadaa2..74c4a9b3ef 100644 --- a/libs/pbd/strsplit.cc +++ b/libs/pbd/strsplit.cc @@ -20,7 +20,6 @@ #include <pbd/strsplit.h> using namespace std; -using namespace Glib; void split (string str, vector<string>& result, char splitchar) @@ -60,40 +59,3 @@ split (string str, vector<string>& result, char splitchar) } } -void -split (ustring str, vector<ustring>& result, char splitchar) -{ - ustring::size_type pos; - ustring remaining; - ustring::size_type len = str.length(); - int cnt; - - cnt = 0; - - if (str.empty()) { - return; - } - - for (ustring::size_type n = 0; n < len; ++n) { - if (str[n] == gunichar(splitchar)) { - cnt++; - } - } - - if (cnt == 0) { - result.push_back (str); - return; - } - - remaining = str; - - while ((pos = remaining.find_first_of (splitchar)) != ustring::npos) { - result.push_back (remaining.substr (0, pos)); - remaining = remaining.substr (pos+1); - } - - if (remaining.length()) { - - result.push_back (remaining); - } -} |