fn compareFN v1 v2 =
(
if (v1.name as name) < (v2.name as name) then -1
else if (v1.name as name) > (v2.name as name) then 1
else 0
)
fn SortNodeArrayByNameAscendingOrder myArray =
(
qsort myArray compareFN
myArray
)
fn SortNodeArrayByName myArray =
(
qsort myArray (fn myname v1 v2 = (if v1.name < v2.name then 0 else 1))
myArray
)
max 自定义排序
最新推荐文章于 2024-11-06 17:44:12 发布