mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 02:56:35 +01:00
Merged with trunk, and a few trivial GUI updates etc.
git-svn-id: svn://localhost/ardour2/branches/midi@664 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5dc4abef79
commit
22c20ab6f2
200 changed files with 5920 additions and 12700 deletions
30
libs/pbd/whitespace.cc
Normal file
30
libs/pbd/whitespace.cc
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <pbd/whitespace.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void
|
||||
strip_whitespace_edges (string& str)
|
||||
{
|
||||
string::size_type i;
|
||||
string::size_type len;
|
||||
string::size_type s;
|
||||
|
||||
len = str.length();
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
if (isgraph (str[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
s = i;
|
||||
|
||||
for (i = len - 1; i >= 0; --i) {
|
||||
if (isgraph (str[i])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
str = str.substr (s, (i - s) + 1);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue