MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / addlenmod

Function addlenmod

extlibs/lua/src/lstrlib.c:1214–1221  ·  view source on GitHub ↗

** add length modifier into formats */

Source from the content-addressed store, hash-verified

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

Callers 1

str_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected