From eacd6dc59411964cc025ba8a9897faa1fb1e6bc6 Mon Sep 17 00:00:00 2001 From: Lukas Sandström Date: Sun, 13 Jul 2008 20:29:18 +0200 Subject: Add some useful functions for strbuf manipulation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lukas Sandström Signed-off-by: Junio C Hamano --- strbuf.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'strbuf.h') diff --git a/strbuf.h b/strbuf.h index a1b01430e2..0c6ffad53a 100644 --- a/strbuf.h +++ b/strbuf.h @@ -77,8 +77,14 @@ static inline void strbuf_setlen(struct strbuf *sb, size_t len) { #define strbuf_reset(sb) strbuf_setlen(sb, 0) /*----- content related -----*/ +extern void strbuf_trim(struct strbuf *); extern void strbuf_rtrim(struct strbuf *); +extern void strbuf_ltrim(struct strbuf *); extern int strbuf_cmp(const struct strbuf *, const struct strbuf *); +extern void strbuf_tolower(struct strbuf *); + +extern struct strbuf **strbuf_split(const struct strbuf *, int delim); +extern void strbuf_list_free(struct strbuf **); /*----- add data in your buffer -----*/ static inline void strbuf_addch(struct strbuf *sb, int c) { -- cgit v1.3