diff options
Diffstat (limited to 'src/auxiliary')
-rw-r--r-- | src/auxiliary/functions.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/auxiliary/functions.cc b/src/auxiliary/functions.cc index 5dbc012..47f7fb2 100644 --- a/src/auxiliary/functions.cc +++ b/src/auxiliary/functions.cc @@ -135,10 +135,11 @@ const std::string lowercase(const std::string &text) void trim(std::string &text) { - while (text.size() && text[0] == ' ') { + // remove spaces and tabs + while (text.size() && ((text[0] == ' ') || (text[0] == 9))) { text.erase(0, 1); } - while (text.size() && text[text.size()-1] == ' ') { + while (text.size() && ((text[text.size()-1] == ' ') || (text[text.size()-1] == 9))) { text.erase(text.size() - 1, 1); } } |