strsort(3)

strsort3

Array heap sort

Usage

#include <ast.h>
void    strsort(char** array, int elements, int (*compare)(const char* a, const char* b));

Overview

$1$2strsortstrsortstrsortstrsortstrsortstrsortstrsortstrsort does a heap sort on the array of pointers array with elements elements using the comparison function compare. compare returns $1$2-1-1-1-1-1-1-1-1 if a is lexicographically less than b, $1$200000000 if a is equal to b, and $1$211111111 if a is lexicographically greater than b.

Releases

Unchanged in 135 releases since Mac OS X 10.4.

  1. 10.4–26.5

From ksh 42 in macOS 26.5. Parsed by carta from the page's man source.