Skip to content

Commit

Permalink
strbuf.h: group documentation for trim functions
Browse files Browse the repository at this point in the history
The relationship between these makes more sense if you read
them as a group, which can help people who are looking for
the right function. Let's give them a single comment.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jan 16, 2015
1 parent f20e56e commit d468fa2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions strbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,19 +164,11 @@ static inline void strbuf_setlen(struct strbuf *sb, size_t len)
*/

/**
* Strip whitespace from the beginning and end of a string.
* Equivalent to performing `strbuf_rtrim()` followed by `strbuf_ltrim()`.
* Strip whitespace from the beginning (`ltrim`), end (`rtrim`), or both side
* (`trim`) of a string.
*/
extern void strbuf_trim(struct strbuf *);

/**
* Strip whitespace from the end of a string.
*/
extern void strbuf_rtrim(struct strbuf *);

/**
* Strip whitespace from the beginning of a string.
*/
extern void strbuf_ltrim(struct strbuf *);

/**
Expand Down

0 comments on commit d468fa2

Please sign in to comment.