From: Jonathan Nieder Date: Wed, 06 Nov 2013 23:28:05 GMT Subject: Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result Message-ID: <20131106232805.GD10302@google.com> In-Reply-To: <61456C34-834F-4E7B-89D2-9DB45690C9ED@quendi.de> 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") == 0 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. Hoping that clarifies, Jonathan