psort - sort a vector of strings |
#include <pstring.h> void psort (vector, int (*compare_fn) (const char **, const char **)); |
Sort a vector of strings, using compare_fn to compare strings. The vector is sorted in-place. |
It is a common mistake to try to use strcmp directly as your comparison function. This will not work. See the C FAQ, section 12, question 12.2 (http://www.lysator.liu.se/c/c-faq/c-12.html). |
Richard Jones <rich@annexia.org> |
GNU LGPL (see http://www.gnu.org/) |
c2lib-1.2.13 |