diff options
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 9485c7d74..34348cc06 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -63,6 +63,16 @@ Settings & Settings::operator = (const Settings &other) } +std::string Settings::sanitizeString(const std::string &value) +{ + std::string str = value; + for (const char *s = "\t\n\v\f\r\b =\""; *s; s++) + str.erase(std::remove(str.begin(), str.end(), *s), str.end()); + + return str; +} + + std::string Settings::getMultiline(std::istream &is) { std::string value; |