On 01/29/2013 12:10 PM, Jeff King wrote:
> On Tue, Jan 29, 2013 at 11:15:34AM +0100, Michael Haggerty wrote:
>> Please document the new functions in
>> Documentation/technical/api-strbuf.txt. Personally I would also
>> advocate a "docstring" in the header file, but obviously that preference
>> is
On Tue, Jan 29, 2013 at 11:15:34AM +0100, Michael Haggerty wrote:
> > +void strbuf_chompmem(struct strbuf *sb, const void *data, size_t len)
> > +{
> > + if (sb->len >= len && !memcmp(data, sb->buf + sb->len - len, len))
> > + strbuf_setlen(sb, sb->len - len);
> > +}
> > +
> > +void st
On 01/29/2013 10:15 AM, Jeff King wrote:
> Sometimes it is handy to cut a trailing string off the end
> of a strbuf (e.g., a file extension). These helper functions
> make it a one-liner.
>
> Signed-off-by: Jeff King
> ---
> strbuf.c | 11 +++
> strbuf.h | 2 ++
> 2 files changed, 13 in
Sometimes it is handy to cut a trailing string off the end
of a strbuf (e.g., a file extension). These helper functions
make it a one-liner.
Signed-off-by: Jeff King
---
strbuf.c | 11 +++
strbuf.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/strbuf.c b/strbuf.c
index 9a373be
4 matches
Mail list logo