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

Method IsString

lua.go:692–698  ·  view source on GitHub ↗

IsString verifies that the value at index is a string, or a number (which is always convertible to a string). http://www.lua.org/manual/5.2/manual.html#lua_isstring

(index int)

Source from the content-addressed store, hash-verified

690//
691// http://www.lua.org/manual/5.2/manual.html#lua_isstring
692func (l *State) IsString(index int) bool {
693 if _, ok := l.indexToValue(index).(string); ok {
694 return true
695 }
696 _, ok := l.indexToValue(index).(float64)
697 return ok
698}
699
700// IsUserData verifies that the value at index is a userdata.
701//

Callers 6

TestLoadFileSyntaxErrorFunction · 0.95
ReadMethod · 0.80
base.goFile · 0.80
findLoaderFunction · 0.80
findFieldFunction · 0.80

Calls 1

indexToValueMethod · 0.95

Tested by 2

TestLoadFileSyntaxErrorFunction · 0.76