MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_number2strx

Function lua_number2strx

depends/lua/src/lstrlib.c:873–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

871
872
873static int lua_number2strx (lua_State *L, char *buff, int sz,
874 const char *fmt, lua_Number x) {
875 int n = num2straux(buff, sz, x);
876 if (fmt[SIZELENMOD] == 'A') {
877 int i;
878 for (i = 0; i < n; i++)
879 buff[i] = toupper(uchar(buff[i]));
880 }
881 else if (fmt[SIZELENMOD] != 'a')
882 return luaL_error(L, "modifiers for format '%%a'/'%%A' not implemented");
883 return n;
884}
885
886#endif /* } */
887

Callers 2

addliteralFunction · 0.85
str_formatFunction · 0.85

Calls 3

num2strauxFunction · 0.85
toupperFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected