aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/StringUtil.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-07 14:44:31 +0200
committerMax Kellermann <max@duempel.org>2014-08-07 16:08:02 +0200
commitf860a2fbd693cc9ce166cdba7491cdd5071ca34a (patch)
tree8295f561439bd87b1d8d39a356a93afa1fee4bd7 /src/util/StringUtil.hxx
parent87bcf739ee6a3e8ac5b400b35b61b72b9d8bd802 (diff)
downloadmpd-f860a2fbd693cc9ce166cdba7491cdd5071ca34a.tar.gz
mpd-f860a2fbd693cc9ce166cdba7491cdd5071ca34a.tar.xz
mpd-f860a2fbd693cc9ce166cdba7491cdd5071ca34a.zip
util/StringUtil: move code to StripRight()
Diffstat (limited to '')
-rw-r--r--src/util/StringUtil.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx
index 6bccbeffe..abed3b45b 100644
--- a/src/util/StringUtil.hxx
+++ b/src/util/StringUtil.hxx
@@ -40,6 +40,20 @@ StripLeft(char *p)
}
/**
+ * Determine the string's length as if it was stripped on the right
+ * side.
+ */
+gcc_pure
+size_t
+StripRight(const char *p, size_t length);
+
+/**
+ * Strip trailing whitespace by null-terminating the string.
+ */
+void
+StripRight(char *p);
+
+/**
* Skip whitespace at the beginning and terminate the string after the
* last non-whitespace character.
*/