projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add function to file_utils intended to be used internally
[ardour.git]
/
libs
/
pbd
/
strsplit.cc
diff --git
a/libs/pbd/strsplit.cc
b/libs/pbd/strsplit.cc
index d30b7356ac387f6939114e3fe198998a03ad5672..f82abf4c92430b7c64014c4c4eb21f70a4d1e22d 100644
(file)
--- a/
libs/pbd/strsplit.cc
+++ b/
libs/pbd/strsplit.cc
@@
-50,7
+50,9
@@
split (string str, vector<string>& result, char splitchar)
remaining = str;
while ((pos = remaining.find_first_of (splitchar)) != string::npos) {
- result.push_back (remaining.substr (0, pos));
+ if (pos != 0) {
+ result.push_back (remaining.substr (0, pos));
+ }
remaining = remaining.substr (pos+1);
}