1// +build !appengine
2
3package internal
4
5import "unsafe"
6
7// String converts byte slice to string.
8func String(b []byte) string {
9	return *(*string)(unsafe.Pointer(&b))
10}
11
12// Bytes converts string to byte slice.
13func Bytes(s string) []byte {
14	return *(*[]byte)(unsafe.Pointer(
15		&struct {
16			string
17			Cap int
18		}{s, len(s)},
19	))
20}
21