On Tue, Jan 14, 2020 at 08:35:40AM +0100, Ján Tomko wrote:
A new helper for trimming combinations of specified characters from
the tail of the buffer.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
...
/**
* virBufferAddStr:
diff --git a/src/util/virbuffer.h b/src/util/virbuffer.h
index 38758a9125..183f78f279 100644
--- a/src/util/virbuffer.h
+++ b/src/util/virbuffer.h
@@ -92,4 +92,5 @@ size_t virBufferGetIndent(const virBuffer *buf);
size_t virBufferGetEffectiveIndent(const virBuffer *buf);
void virBufferTrim(virBufferPtr buf, const char *trim, int len);
+void virBufferTrimChars(virBufferPtr buf, const char *trim);
void virBufferAddStr(virBufferPtr buf, const char *str);
diff --git a/tests/virbuftest.c b/tests/virbuftest.c
index 1780b62bf4..7919075000 100644
--- a/tests/virbuftest.c
+++ b/tests/virbuftest.c
@@ -12,6 +12,7 @@
struct testBufAddStrData {
const char *data;
const char *expect;
+ const char *arg;
Maybe *opaque? #naming,#bikeshedding...
Reviewed-by: Erik Skultety <eskultet(a)redhat.com>