diff options
Diffstat (limited to 'src/html.cpp')
-rw-r--r-- | src/html.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/html.cpp b/src/html.cpp index 4c25b9f3..ee8ddad8 100644 --- a/src/html.cpp +++ b/src/html.cpp @@ -2,9 +2,9 @@ #include "types.h" #include "utf8_strings.h" -void litehtml::trim(string &s) +void litehtml::trim(string &s, const string& chars_to_trim) { - string::size_type pos = s.find_first_not_of(" \n\r\t"); + string::size_type pos = s.find_first_not_of(chars_to_trim); if(pos != string::npos) { s.erase(s.begin(), s.begin() + pos); @@ -14,7 +14,7 @@ void litehtml::trim(string &s) s = ""; return; } - pos = s.find_last_not_of(" \n\r\t"); + pos = s.find_last_not_of(chars_to_trim); if(pos != string::npos) { s.erase(s.begin() + pos + 1, s.end()); |