MCPcopy Index your code
hub / github.com/Shopify/go-lua / Concat

Method Concat

lua.go:1209–1216  ·  view source on GitHub ↗

Concat concatenates the n values at the top of the stack, pops them, and leaves the result at the top. If n is 1, the result is the single value on the stack (that is, the function does nothing); if n is 0, the result is the empty string. Concatenation is performed following the usual semantic of Lu

(n int)

Source from the content-addressed store, hash-verified

1207//
1208// http://www.lua.org/manual/5.2/manual.html#lua_concat
1209func (l *State) Concat(n int) {
1210 l.checkElementCount(n)
1211 if n >= 2 {
1212 l.concat(n)
1213 } else if n == 0 { // push empty string
1214 l.apiPush("")
1215 } // else n == 1; nothing to do
1216}
1217
1218// Register sets the Go function f as the new value of global name. If
1219// name was already defined, it is overwritten.

Callers 3

base.goFile · 0.80
findFieldFunction · 0.80
ErrorfFunction · 0.80

Calls 3

checkElementCountMethod · 0.95
concatMethod · 0.95
apiPushMethod · 0.95

Tested by

no test coverage detected