gitlab.com/evatix-go/core@v1.3.55/coreutils/stringutil/RemoveMany.go (about)

     1  package stringutil
     2  
     3  import (
     4  	"strings"
     5  
     6  	"gitlab.com/evatix-go/core/constants"
     7  )
     8  
     9  func RemoveMany(
    10  	content string,
    11  	removeRequests ...string,
    12  ) string {
    13  	if content == "" {
    14  		return content
    15  	}
    16  
    17  	for _, remove := range removeRequests {
    18  		content = strings.ReplaceAll(
    19  			content,
    20  			remove,
    21  			constants.EmptyString)
    22  	}
    23  
    24  	return content
    25  }