(L *LState)
| 10 | const emptyLString LString = LString("") |
| 11 | |
| 12 | func 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 | |
| 27 | var strFuncs = map[string]LGFunction{ |
| 28 | "byte": strByte, |
nothing calls this directly
no test coverage detected
searching dependent graphs…