int lua_isstring (lua_State *L, int index);
如果给定可接受索引处的值是字符串或数字(始终可转换为字符串),则此函数返回 1,否则返回 0。(来源)
是否有一种(更优雅的)方法来真正证明给定的字符串是否真的是字符串而不是Lua 中的数字?这个功能对我来说完全没有意义!
我的第一个想法是另外检查字符串长度
`if(string.len(String) > 1) {/* this must be a string */}`
……但这感觉不太好。