add UnsafeCastString
diff --git a/reflect2.go b/reflect2.go
index ac13ad6..0632b71 100644
--- a/reflect2.go
+++ b/reflect2.go
@@ -283,3 +283,13 @@
 	x := uintptr(p)
 	return unsafe.Pointer(x ^ 0)
 }
+
+func UnsafeCastString(str string) []byte {
+	stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str))
+	sliceHeader := &reflect.SliceHeader{
+		Data: stringHeader.Data,
+		Cap: stringHeader.Len,
+		Len: stringHeader.Len,
+	}
+	return *(*[]byte)(unsafe.Pointer(sliceHeader))
+}