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

Function addlenmod

depends/lua/src/lstrlib.c:1006–1013  ·  view source on GitHub ↗

** add length modifier into formats */

Source from the content-addressed store, hash-verified

1004** add length modifier into formats
1005*/
1006static void addlenmod (char *form, const char *lenmod) {
1007 size_t l = strlen(form);
1008 size_t lm = strlen(lenmod);
1009 char spec = form[l - 1];
1010 strcpy(form + l - 1, lenmod);
1011 form[l + lm - 1] = spec;
1012 form[l + lm] = '\0';
1013}
1014
1015
1016static int str_format (lua_State *L) {

Callers 1

str_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected