BStringList: add Sort() with custom functions

fix #9268 and a TODO

Change-Id: I3148b32221f34f5fb270d8892a6fc80f69ba2e29
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11104
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Jérôme Duval
2026-06-15 14:49:00 +00:00
parent 22a2180aa5
commit 528bb58299
4 changed files with 158 additions and 1 deletions
+4 -1
View File
@@ -36,7 +36,10 @@ public:
// Reorder items
void Sort(bool ignoreCase = false);
// TODO: Sort() with custom sort function.
void Sort(int (*compareFunc)(const char*,
const char*, void* context), void* context);
void Sort(int (*compareFunc)(const BString&,
const BString&, void* context), void* context);
bool Swap(int32 indexA, int32 indexB);
bool Move(int32 fromIndex, int32 toIndex);