blob: a1f6f333860e8205de615bfed059e09708c3b306 [file] [log] [blame]
khenaidoo5fc5cea2021-08-11 17:39:16 -04001// Copyright 2018 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Joey Armstrongba3d9d12024-01-15 14:22:11 -05005//go:build purego || appengine
khenaidoo5fc5cea2021-08-11 17:39:16 -04006// +build purego appengine
7
8package strs
9
10import pref "google.golang.org/protobuf/reflect/protoreflect"
11
12func UnsafeString(b []byte) string {
13 return string(b)
14}
15
16func UnsafeBytes(s string) []byte {
17 return []byte(s)
18}
19
20type Builder struct{}
21
22func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName {
23 return prefix.Append(name)
24}
25
26func (*Builder) MakeString(b []byte) string {
27 return string(b)
28}