1 /* go-strplus.c -- the go string append function.
3 Copyright 2009 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
12 __go_string_plus (String s1
, String s2
)
23 len
= s1
.len
+ s2
.len
;
24 retdata
= runtime_mallocgc (len
, 0, FlagNoScan
| FlagNoZero
);
25 __builtin_memcpy (retdata
, s1
.str
, s1
.len
);
26 __builtin_memcpy (retdata
+ s1
.len
, s2
.str
, s2
.len
);