Re: [PATCH 1/2] strbuf: Use _rtrim and _ltrim in strbuf_trim
- From
Jeff King <peff@peff.net>
- Date
- Apr 30, 2014, 17:11 UTC
- Message-ID
- <20140430171105.GA8518@sigill.intra.peff.net>
- In-Reply-To
- <1398848287-77109-1-git-send-email-modocache@gmail.com>
On Wed, Apr 30, 2014 at 05:58:06PM +0900, Brian Gesiak wrote:
Show 6 quoted lines
> strbuf_trim strips whitespace from the end, then the beginning of a > strbuf. Those operations are duplicated in strbuf_rtrim and > strbuf_ltrim. > > Replace strbuf_trim implementation with calls to strbuf_rtrim, > then strbuf_ltrim.
Thanks, this looks good. I wondered if perhaps doing them together inline might have been more efficient, but there really is no overlap in what they compute.
The documentation patch looks good to me, too.
-Peff