diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-31 11:43:46 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-31 11:43:46 +0000 |
commit | 2a41efa0d43b573e1c8851086268b8a64d51c511 (patch) | |
tree | 1727c8aeb8b540ee4990bd92c0e8158a409b9397 /src/auxiliary/functions.cc | |
parent | 4b527153ccf2a2830e38038ce4cf06ccc764d310 (diff) |
fixes zlib compression, infi file parser updates
Diffstat (limited to 'src/auxiliary/functions.cc')
-rw-r--r-- | src/auxiliary/functions.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/auxiliary/functions.cc b/src/auxiliary/functions.cc index e9861ac..5edff56 100644 --- a/src/auxiliary/functions.cc +++ b/src/auxiliary/functions.cc @@ -122,4 +122,14 @@ const std::string lowercase(const std::string &text) return t; } +void trim(std::string &text) +{ + while (text.size() && text[0] == ' ') { + text.erase(0, 1); + } + while (text.size() && text[text.size()-1] == ' ') { + text.erase(text.size()-1, 1); + } +} + } |