MCPcopy Create free account
hub / github.com/F-Stack/f-stack / addlenmod

Function addlenmod

freebsd/contrib/openzfs/module/lua/lstrlib.c:893–900  ·  view source on GitHub ↗

** add length modifier into formats */

Source from the content-addressed store, hash-verified

891** add length modifier into formats
892*/
893static void addlenmod (char *form, const char *lenmod, size_t size) {
894 size_t l = strlen(form);
895 size_t lm = strlen(lenmod);
896 char spec = form[l - 1];
897 strlcpy(form + l - 1, lenmod, size - (l - 1));
898 form[l + lm - 1] = spec;
899 form[l + lm] = '\0';
900}
901
902
903static int str_format (lua_State *L) {

Callers 1

str_formatFunction · 0.85

Calls 1

strlcpyFunction · 0.50

Tested by

no test coverage detected