MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / addlenmod

Function addlenmod

src/Chain/libraries/glua/lstrlib.cpp:1040–1047  ·  view source on GitHub ↗

** add length modifier into formats */

Source from the content-addressed store, hash-verified

1038** add length modifier into formats
1039*/
1040static void addlenmod(char *form, const char *lenmod) {
1041 size_t l = strlen(form);
1042 size_t lm = strlen(lenmod);
1043 char spec = form[l - 1];
1044 strcpy(form + l - 1, lenmod);
1045 form[l + lm - 1] = spec;
1046 form[l + lm] = '\0';
1047}
1048
1049static int str_format(lua_State *L) {
1050 int top = lua_gettop(L);

Callers 1

str_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected