From 4051804901e15ecbf0a1588c845dad740e5f3141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 14 Jun 2017 14:03:44 +0200 Subject: array: add array_sort utility function --- array.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'array.h') diff --git a/array.h b/array.h index a01f19a..8417f7d 100644 --- a/array.h +++ b/array.h @@ -102,5 +102,9 @@ bool array_truncate(Array*, size_t length); * @endrst */ bool array_resize(Array*, size_t length); +/** + * Sort array, the comparision function works as for `qsort(3)`. + */ +void array_sort(Array*, int (*compar)(const void*, const void*)); #endif -- cgit v1.2.3