Re: [PATCH v10 3/9] strbuf: add a case insensitive starts_with()

2018-03-09 Thread Ævar Arnfjörð Bjarmason
On Fri, Mar 09 2018, Junio C. Hamano jotted: > Lars Schneider writes: > >> I think following the boost lib makes most sense. Therefore, >> I would like to go with "istarts_with". OK with you? > > I don't care too deeply; if we took starts_with() from there, where > what we now want is defined as

Re: [PATCH v10 3/9] strbuf: add a case insensitive starts_with()

2018-03-09 Thread Junio C Hamano
Lars Schneider writes: > I think following the boost lib makes most sense. Therefore, > I would like to go with "istarts_with". OK with you? I don't care too deeply; if we took starts_with() from there, where what we now want is defined as istarts_with(), then that sounds like a good thing to do

Re: [PATCH v10 3/9] strbuf: add a case insensitive starts_with()

2018-03-09 Thread Lars Schneider
> On 09 Mar 2018, at 00:12, Junio C Hamano wrote: > > Duy Nguyen writes: > >>> extern int starts_with(const char *str, const char *prefix); >>> +extern int startscase_with(const char *str, const char *prefix); >> >> This name is a bit hard to read. Boost [1] goes with istarts_with. I >> wonde

Re: [PATCH v10 3/9] strbuf: add a case insensitive starts_with()

2018-03-08 Thread Junio C Hamano
Duy Nguyen writes: >> extern int starts_with(const char *str, const char *prefix); >> +extern int startscase_with(const char *str, const char *prefix); > > This name is a bit hard to read. Boost [1] goes with istarts_with. I > wonder if it's better. If not I guess either starts_with_case or > st

Re: [PATCH v10 3/9] strbuf: add a case insensitive starts_with()

2018-03-07 Thread Duy Nguyen
On Thu, Mar 8, 2018 at 12:30 AM, wrote: > From: Lars Schneider > > Check in a case insensitive manner if one string is a prefix of another > string. > > This function is used in a subsequent commit. > > Signed-off-by: Lars Schneider > --- > git-compat-util.h | 1 + > strbuf.c | 9