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

     1  package stringslice
     2  
     3  import "gitlab.com/evatix-go/core/constants"
     4  
     5  func LastSafeIndexPtr(slice *[]string) int {
     6  	if IsEmptyPtr(slice) {
     7  		return constants.InvalidNotFoundCase
     8  	}
     9  
    10  	return len(*slice) - constants.One
    11  }