golang 数组与字符串数组sort.Slice排序

  • Post author:
  • Post category:golang


字符串数组排序

 sort.Sort(sort.StringSlice(strs))

数组排序

sort.Slice(nums,func(i,j int)bool{
    return nums[i]<nums[j]
})       



版权声明:本文为qq_40701060原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。