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)
| 690 | // |
| 691 | // http://www.lua.org/manual/5.2/manual.html#lua_isstring |
| 692 | func (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 | // |