Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result
Show 10 quoted lines
> Am 07.11.2013 um 00:28 schrieb Jonathan Nieder <jrnieder@gmail.com>:
>
> Max Horn wrote:
>
>> Well, unlike suffixcmp, it is transitive, so it could be used for sorting.
>
> It is not antisymmetric.
>
> prefixcmp("foo", "foobar") < 0
> prefixcmp("foobar", "foo") == 0Right! I wasn't thinkinh :-(
>
> I can see how it's possible to care about the sign of the return
> value, but it's equally possible to care about the sign from
> suffixcmp. Neither is suitable as a function for passing to qsort.
Yeah, so then I'd be for changing rhis one to has_prefix.
>
> Hoping that clarifies,
> Jonathan
>