Re: [PATCH] compat: add memrchr()
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Oct 15, 2010, 08:56 UTC
- Message-ID
- <AANLkTi=MbSeeUcPpPt_yLyeTv10pNzHqGUu3ihXf8jb+@mail.gmail.com>
- In-Reply-To
- <20101015051750.GA21830@burratino>
On Fri, Oct 15, 2010 at 7:17 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 8 quoted lines
> Reimplement another handy convenience function from glibc. memrchr() > searches from the end of a memory area for a particular character. It > is similar to strrchr() but takes a length argument and is > binary-safe. > > The whole-directory rename detection patch could use this to find the > last directory separator in a (possibly truncated) pathname. >
Are you sure this would work on Windows where both '/' and '\' are valid directory separators?