gitlab.com/evatix-go/core@v1.3.55/coreutils/stringutil/RemoveManyBySplitting.go (about) 1 package stringutil 2 3 import ( 4 "strings" 5 6 "gitlab.com/evatix-go/core/constants" 7 ) 8 9 // RemoveManyBySplitting Remove as per removes then splits by the given separator 10 func RemoveManyBySplitting( 11 content string, 12 splitsBy string, 13 removeRequests ...string, 14 ) []string { 15 for _, remove := range removeRequests { 16 content = strings.ReplaceAll(content, remove, constants.EmptyString) 17 } 18 19 return strings.Split(content, splitsBy) 20 }