lua下table.sort 的排序问题

2025年05月05日 15:37
有1个网友回答
网友(1):

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