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

Function addlenmod

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

** add length modifier into formats */

Source from the content-addressed store, hash-verified

1215** add length modifier into formats
1216*/
1217static void addlenmod (char *form, const char *lenmod) {
1218 size_t l = strlen(form);
1219 size_t lm = strlen(lenmod);
1220 char spec = form[l - 1];
1221 strcpy(form + l - 1, lenmod);
1222 form[l + lm - 1] = spec;
1223 form[l + lm] = '\0';
1224}
1225
1226
1227static int str_format (lua_State *L) {

Callers 1

str_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected