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

Method ToBool

state.go:1656–1658  ·  view source on GitHub ↗

* }}} */ * toType {{{ */

(n int)

Source from the content-addressed store, hash-verified

1654/* toType {{{ */
1655
1656func (ls *LState) ToBool(n int) bool {
1657 return LVAsBool(ls.Get(n))
1658}
1659
1660func (ls *LState) ToInt(n int) int {
1661 if lv, ok := ls.Get(n).(LNumber); ok {

Callers 1

baseAssertFunction · 0.45

Calls 2

GetMethod · 0.95
LVAsBoolFunction · 0.85

Tested by

no test coverage detected