# Functions
No description provided by the author
No description provided by the author
No description provided by the author
给[]int 去重。 该函数总共初始化两个变量,一个长度为0的slice,一个空map。由于slice传参是按引用传递,没有创建额外的变量。 只是用了一个for循环,代码更简洁易懂。 利用了map的多返回值特性。 空struct不占内存空间,可谓巧妙。.
给[]string去重,原理同上.
给[]uin去重,原理同上.
删除Array中的某个int(如果该array中有多个相同的元素,每次只能删除1个).
如果sourceArray中有 toBeRemoved array中的元素,则从sourceArray中删除,最终返回新的array https://stackoverflow.com/questions/5020958/go-what-is-the-fastest-cleanest-way-to-remove-multiple-entries-from-a-slice/5022696.
删除Array中的某个uint(如果该array中有多个相同的元素,每次只能删除1个).
将一个string array 分成最大数量 length个的若干个string array,分成了groups组 当stringArray为空array时,groups == 0.
将字符串list转换为int list,如果字符串list中的某元素不可转换为int,则 int list中不会有此项。.
No description provided by the author
No description provided by the author