Merged with trunk R1141

git-svn-id: svn://localhost/ardour2/branches/midi@1142 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2006-11-19 16:45:16 +00:00
parent af105afe6c
commit ef6b25432d
209 changed files with 21004 additions and 6768 deletions

View file

@ -11,6 +11,10 @@ strip_whitespace_edges (string& str)
len = str.length();
if (len == 1) {
return;
}
/* strip front */
for (i = 0; i < len; ++i) {
@ -19,12 +23,21 @@ strip_whitespace_edges (string& str)
}
}
if (i == len) {
/* its all whitespace, not much we can do */
return;
}
/* strip back */
if (len > 1) {
s = i;
i = len - 1;
if (s == i) {
return;
}
do {
if (isgraph (str[i]) || i == 0) {