MCPcopy Index your code
hub / github.com/yuin/gopher-lua / OpenString

Function OpenString

stringlib.go:12–25  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

10const emptyLString LString = LString("")
11
12func OpenString(L *LState) int {
13 var mod *LTable
14 //_, ok := L.G.builtinMts[int(LTString)]
15 //if !ok {
16 mod = L.RegisterModule(StringLibName, strFuncs).(*LTable)
17 gmatch := L.NewClosure(strGmatch, L.NewFunction(strGmatchIter))
18 mod.RawSetString("gmatch", gmatch)
19 mod.RawSetString("gfind", gmatch)
20 mod.RawSetString("__index", mod)
21 L.G.builtinMts[int(LTString)] = mod
22 //}
23 L.Push(mod)
24 return 1
25}
26
27var strFuncs = map[string]LGFunction{
28 "byte": strByte,

Callers

nothing calls this directly

Calls 5

RawSetStringMethod · 0.95
RegisterModuleMethod · 0.80
PushMethod · 0.65
NewClosureMethod · 0.45
NewFunctionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…