diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 18:49:04 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 18:49:04 +0100 |
commit | 850f33ac0ca6543de60929d781a85cb2a1702671 (patch) | |
tree | cc4cb89a55e22f61f74f6c53ddd3f1295dd6dd36 /src/core/common/Utils.hpp | |
parent | e8863235b93ff79cd68faf93e92140114bfa4ceb (diff) |
Formating
Diffstat (limited to 'src/core/common/Utils.hpp')
-rw-r--r-- | src/core/common/Utils.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/common/Utils.hpp b/src/core/common/Utils.hpp index f6f5225..564c5e6 100644 --- a/src/core/common/Utils.hpp +++ b/src/core/common/Utils.hpp @@ -73,10 +73,7 @@ public: /** * Returns true if the given character is a whitespace character. */ - static bool isLinebreak(const char c) - { - return (c == '\n') || (c == '\r'); - } + static bool isLinebreak(const char c) { return (c == '\n') || (c == '\r'); } /** * Removes whitespace at the beginning and the end of the given string. @@ -93,11 +90,12 @@ public: * @param s is the container that should be trimmed. * @param f is a function that returns true for values that should be * removed. - * @return start and end index. Note that "end" points at the character beyond - * the end, thus "end" minus "start" + * @return start and end index. Note that "end" points at the character + * beyond the end, thus "end" minus "start" */ template <class T, class Filter> - static std::pair<size_t, size_t> trim(const T &s, Filter f) { + static std::pair<size_t, size_t> trim(const T &s, Filter f) + { size_t start = 0; for (size_t i = 0; i < s.size(); i++) { if (!f(s[i])) { |