MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_number2strx

Function lua_number2strx

3rd/lua-5.4.3/src/lstrlib.c:1056–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1054
1055
1056static int lua_number2strx (lua_State *L, char *buff, int sz,
1057 const char *fmt, lua_Number x) {
1058 int n = num2straux(buff, sz, x);
1059 if (fmt[SIZELENMOD] == 'A') {
1060 int i;
1061 for (i = 0; i < n; i++)
1062 buff[i] = toupper(uchar(buff[i]));
1063 }
1064 else if (l_unlikely(fmt[SIZELENMOD] != 'a'))
1065 return luaL_error(L, "modifiers for format '%%a'/'%%A' not implemented");
1066 return n;
1067}
1068
1069#endif /* } */
1070

Callers 2

quotefloatFunction · 0.85
str_formatFunction · 0.85

Calls 2

num2strauxFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected