User Tools

Site Tools


uphp:library_functions:quick_sort

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
uphp:library_functions:quick_sort [2021/12/27 08:45]
admin
uphp:library_functions:quick_sort [2021/12/27 08:50] (current)
admin
Line 39: Line 39:
 | SORT_KEY   | 0     | Sort an array by the key                  | | SORT_KEY   | 0     | Sort an array by the key                  |
 | SORT_VALUE | 1     | Sort an array by the value                | | SORT_VALUE | 1     | Sort an array by the value                |
-| SORT_FUNC  | 2     | Sort an array using a callback function   |+| SORT_FUNC  | 2     | Sort an array using a callback function * only in OS4+  |
  
 <html><b><span style="color:blue">$callback<span style="color:black"></b></html>: optional string containing function name for callback of the method is SORT_FUNC.  The function needs to have 2 parameters, which will be the array elements.  These need to be compared and if the first array is less than the second array, the function should return 1, otherwise it should return 0.  See the example below. <html><b><span style="color:blue">$callback<span style="color:black"></b></html>: optional string containing function name for callback of the method is SORT_FUNC.  The function needs to have 2 parameters, which will be the array elements.  These need to be compared and if the first array is less than the second array, the function should return 1, otherwise it should return 0.  See the example below.
uphp/library_functions/quick_sort.txt · Last modified: 2021/12/27 08:50 by admin