Skip to content

MTY_Sort

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Stable qsort.

For more information, see qsort from the C standard library. The difference between this function and qsort is that the order of elements that compare equally will be preserved.

void MTY_Sort(
    void *          buf,
    size_t          len,
    size_t          size,
    MTY_CompareFunc func
);

Parameters

buf (void *)

The buffer to sort.

len (size_t)

Number of elements in buf.

size (size_t)

Size in bytes of each element.

func (MTY_CompareFunc)

Function called to compare elements as the algorithm processes the buffer.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: Memory

Clone this wiki locally