diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-14 16:50:22 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-09-14 16:50:22 +0000 |
commit | c1ee2c6943623e43181d56eed0de18b608fff86a (patch) | |
tree | 454de746c44383aac77033460532d8f8c0d129ed /libs/pbd/whitespace.cc | |
parent | 4d112a8e6b90fa64a5cd333042044768111ba994 (diff) |
use isspace() and not isgraph() to identify whitespace; remove Glib::ustring version of strip_whitespace_edges()
git-svn-id: svn://localhost/ardour2/branches/3.0@7773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/whitespace.cc')
-rw-r--r-- | libs/pbd/whitespace.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/libs/pbd/whitespace.cc b/libs/pbd/whitespace.cc index 7fafd07c6f..00d47523db 100644 --- a/libs/pbd/whitespace.cc +++ b/libs/pbd/whitespace.cc @@ -18,7 +18,6 @@ */ #include "pbd/whitespace.h" -#include <glibmm/ustring.h> using namespace std; @@ -40,7 +39,7 @@ strip_whitespace_edges (string& str) /* strip front */ for (i = 0; i < len; ++i) { - if (isgraph (str[i])) { + if (!isspace (str[i])) { break; } } @@ -63,7 +62,7 @@ strip_whitespace_edges (string& str) } do { - if (isgraph (str[i]) || i == 0) { + if (!isspace (str[i]) || i == 0) { break; } @@ -78,12 +77,4 @@ strip_whitespace_edges (string& str) } } -void -strip_whitespace_edges (Glib::ustring& str) -{ - string copy (str.raw()); - strip_whitespace_edges (copy); - str = copy; -} - } // namespace PBD |