Skip to content

Commit d468fa2

Browse files
peffgitster
authored andcommitted
strbuf.h: group documentation for trim functions
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f20e56e commit d468fa2

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

strbuf.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,11 @@ static inline void strbuf_setlen(struct strbuf *sb, size_t len)
164164
*/
165165

166166
/**
167-
* Strip whitespace from the beginning and end of a string.
168-
* Equivalent to performing `strbuf_rtrim()` followed by `strbuf_ltrim()`.
167+
* Strip whitespace from the beginning (`ltrim`), end (`rtrim`), or both side
168+
* (`trim`) of a string.
169169
*/
170170
extern void strbuf_trim(struct strbuf *);
171-
172-
/**
173-
* Strip whitespace from the end of a string.
174-
*/
175171
extern void strbuf_rtrim(struct strbuf *);
176-
177-
/**
178-
* Strip whitespace from the beginning of a string.
179-
*/
180172
extern void strbuf_ltrim(struct strbuf *);
181173

182174
/**

0 commit comments

Comments
 (0)