Closed elisee closed 11 years ago
Lua uses luaL_checklstring on arguments in string.* functions to ensure they are strings or numbers and coerce numbers into strings.
This pull request introduces a check_string() function that does the same and uses it for supported string.* functions.
For instance, this allows running string.len( 456 ) and get back 3, like the original Lua allows.
string.len( 456 )
Bump (because I might have more patches coming soon and I'd like to get this one in first)
Looking forward to the new patches. Sorry for the delay!
Lua uses luaL_checklstring on arguments in string.* functions to ensure they are strings or numbers and coerce numbers into strings.
This pull request introduces a check_string() function that does the same and uses it for supported string.* functions.
For instance, this allows running
string.len( 456 )
and get back 3, like the original Lua allows.