remove runtime.NewString

This commit is contained in:
xushiwei
2024-05-21 01:30:15 +08:00
parent bbd1187a9c
commit 508b4d648d
12 changed files with 701 additions and 512 deletions

View File

@@ -35,17 +35,6 @@ type String struct {
len int
}
// EmptyString returns an empty string.
func EmptyString() String {
return String{nil, 0}
}
// TODO(xsw): unsafe.String
// NewString creates a new string.
func NewString(data unsafe.Pointer, len int) String {
return String{data, len}
}
// StringCat concatenates two strings.
func StringCat(a, b String) String {
n := a.len + b.len