(str string, spi ...string)
| 334 | } |
| 335 | |
| 336 | func SplitStr(str string, spi ...string) []string { |
| 337 | lists := []string{str} |
| 338 | var results []string |
| 339 | for _, s := range spi { |
| 340 | results = []string{} |
| 341 | for _, list := range lists { |
| 342 | results = append(results, strings.Split(list, s)...) |
| 343 | } |
| 344 | lists = results |
| 345 | } |
| 346 | return results |
| 347 | } |
| 348 | |
| 349 | func IsValidIP(ip string) bool { |
| 350 | return net.ParseIP(ip) != nil |
no outgoing calls
no test coverage detected