summaryrefslogtreecommitdiff
path: root/libs/pbd/strsplit.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-08-18 14:20:10 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-08-18 14:20:10 +0000
commitc8f5d847e530083a7aa658dad9a37af7b4647615 (patch)
tree60c55c879a31ab92614f10b8f6f2722448f8f87a /libs/pbd/strsplit.cc
parentbc9d6f66c127f06c37f89ba6477fd1156a9e43f6 (diff)
step one of removing Glib::ustring from ardour2
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@10003 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/strsplit.cc')
-rw-r--r--libs/pbd/strsplit.cc38
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);
- }
-}