lua下table.sort 的排序问题

2025-05-05 15:37:57
推荐回答(1个)
回答1:

table.sort(arr, fun(a,b))这里面的函数就是要返回一个Boolean值,如果是这样 return a>b那么就将a排前面,也就是升序