gitlab.com/evatix-go/core@v1.3.55/coredata/stringslice/NonWhitespaceJoin.go (about)

     1  package stringslice
     2  
     3  import (
     4  	"strings"
     5  
     6  	"gitlab.com/evatix-go/core/constants"
     7  )
     8  
     9  func NonWhitespaceJoin(slice []string, joiner string) string {
    10  	if slice == nil {
    11  		return constants.EmptyString
    12  	}
    13  
    14  	length := len(slice)
    15  
    16  	if length == 0 {
    17  		return constants.EmptyString
    18  	}
    19  
    20  	return strings.Join(*NonWhitespaceSlicePtr(&slice), joiner)
    21  }