STRSORT(3ast) STRSORT(3ast)

# [NAME](#NAME)

strsort - array heap sort

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

strsort does a heap sort on the array of pointers *array* with *elements* elements using the comparison function *compare*. *compare* returns -1 if *a* is lexicographically less than *b*, 0 if *a* is equal to *b*, and 1 if *a* is lexicographically greater than *b*.

---

Document: strsort(3ast) from ksh 1.0.10-r36 (Chainguard OS)
Source: https://github.com/ksh93/ksh
