MCPcopy Create free account
hub / github.com/dop251/goja / Concat

Method Concat

string_unicode.go:460–475  ·  view source on GitHub ↗
(other String)

Source from the content-addressed store, hash-verified

458}
459
460func (s unicodeString) Concat(other String) String {
461 a, u := devirtualizeString(other)
462 if u != nil {
463 b := make(unicodeString, len(s)+len(u)-1)
464 copy(b, s)
465 copy(b[len(s):], u[1:])
466 return b
467 }
468 b := make([]uint16, len(s)+len(a))
469 copy(b, s)
470 b1 := b[len(s):]
471 for i := 0; i < len(a); i++ {
472 b1[i] = uint16(a[i])
473 }
474 return unicodeString(b)
475}
476
477func (s unicodeString) Substring(start, end int) String {
478 ss := s[start+1 : end+1]

Callers

nothing calls this directly

Calls 2

devirtualizeStringFunction · 0.85
unicodeStringTypeAlias · 0.85

Tested by

no test coverage detected