---
name: "strsort"
section: "3"
platform: "macos"
package: "ksh"
version: "42"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/strsort"
---

# strsort(3)

array heap sort

## NAME

hsort - array heap sort

## SYNOPSIS

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

## DESCRIPTION

$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*.
