nuclei/v2/pkg/protocols/common/tostring/tostring.go

9 lines
187 B
Go

package tostring
import "unsafe"
// UnsafeToString converts byte slice to string with zero allocations
func UnsafeToString(bs []byte) string {
return *(*string)(unsafe.Pointer(&bs))
}