| 408 | |
| 409 | |
| 410 | LUA_API unsigned lua_numbertocstring (lua_State *L, int idx, char *buff) { |
| 411 | const TValue *o = index2value(L, idx); |
| 412 | if (ttisnumber(o)) { |
| 413 | unsigned len = luaO_tostringbuff(o, buff); |
| 414 | buff[len++] = '\0'; /* add final zero */ |
| 415 | return len; |
| 416 | } |
| 417 | else |
| 418 | return 0; |
| 419 | } |
| 420 | |
| 421 | |
| 422 | LUA_API size_t lua_stringtonumber (lua_State *L, const char *s) { |
no test coverage detected