|
@@ -247,10 +247,7 @@ func (s asciiString) length() int {
|
|
func (s asciiString) concat(other valueString) valueString {
|
|
func (s asciiString) concat(other valueString) valueString {
|
|
switch other := other.(type) {
|
|
switch other := other.(type) {
|
|
case asciiString:
|
|
case asciiString:
|
|
- b := make([]byte, len(s)+len(other))
|
|
|
|
- copy(b, s)
|
|
|
|
- copy(b[len(s):], other)
|
|
|
|
- return asciiString(b)
|
|
|
|
|
|
+ return asciiString(s + other)
|
|
case unicodeString:
|
|
case unicodeString:
|
|
b := make([]uint16, len(s)+len(other))
|
|
b := make([]uint16, len(s)+len(other))
|
|
b[0] = unistring.BOM
|
|
b[0] = unistring.BOM
|