]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: add strordered() to check whether strings are ordered
authorWilly Tarreau <w@1wt.eu>
Wed, 30 Mar 2022 08:02:56 +0000 (10:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Mar 2022 08:02:56 +0000 (10:02 +0200)
commit3ff476e9efd44fac747cc1049ecef486519a1554
tree732e714b8f201dbcea916225e4bde13e3e692ae8
parent29d799d591d28cbbda3a8a6f3335ab5b0c19a76e
MINOR: tools: add strordered() to check whether strings are ordered

When trying to sort sets of strings, it's often needed to required to
compare 3 strings to see if the chosen one fits well between the two
others. That's what this function does, in addition to being able to
ignore extremities when they're NULL (typically for the first iteration
for example).
include/haproxy/tools.h
src/tools.c