You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
360 B
20 lines
360 B
5 months ago
|
package utils
|
||
|
|
||
|
func ArrayStrRemove(old, loser []string) []string {
|
||
|
for j := 0; j < len(loser); j++ {
|
||
|
for i := 0; i < len(old); i++ {
|
||
|
if old[i] == loser[j] { //将元素剔除
|
||
|
if old[i] == loser[j] {
|
||
|
if i == len(old)-1 {
|
||
|
old = old[:i]
|
||
|
} else {
|
||
|
old = append(old[:i], old[i+1:]...)
|
||
|
i--
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return old
|
||
|
}
|