MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / lua_numbertocstring

Function lua_numbertocstring

src/lapi.cpp:410–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408
409
410LUA_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
422LUA_API size_t lua_stringtonumber (lua_State *L, const char *s) {

Callers 2

g_writeFunction · 0.85
luaL_tolstringFunction · 0.85

Calls 2

index2valueFunction · 0.85
luaO_tostringbuffFunction · 0.85

Tested by

no test coverage detected