diff options
author | Max Kellermann <max@duempel.org> | 2014-08-07 15:15:56 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-07 16:08:02 +0200 |
commit | 59d38f876a22ef520c6b897a356e8fb8677481aa (patch) | |
tree | ac97bf3dfa23a4ae30a1d76375493f8815c649ff /src/input/TextInputStream.cxx | |
parent | 5c5c6a965cc3af4c8e725c7c9cc377e80f728279 (diff) |
util/StringUtil: add StripRight() overload with "end" argument
Diffstat (limited to 'src/input/TextInputStream.cxx')
-rw-r--r-- | src/input/TextInputStream.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input/TextInputStream.cxx b/src/input/TextInputStream.cxx index 36aa5f408..177606d6d 100644 --- a/src/input/TextInputStream.cxx +++ b/src/input/TextInputStream.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "TextInputStream.hxx" #include "InputStream.hxx" -#include "util/CharUtil.hxx" +#include "util/StringUtil.hxx" #include "util/Error.hxx" #include "Log.hxx" @@ -72,8 +72,7 @@ TextInputStream::ReadLine() buffer.Consume(p - src + 1); - while (p > src && IsWhitespaceFast(p[-1])) - --p; - *p = 0; + char *end = StripRight(src, p); + *end = 0; return src; } |