MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / addlenmod

Function addlenmod

libraries/AP_Scripting/lua/src/lstrlib.c:1013–1020  ·  view source on GitHub ↗

** add length modifier into formats */

Source from the content-addressed store, hash-verified

1011** add length modifier into formats
1012*/
1013static void addlenmod (char *form, const char *lenmod) {
1014 size_t l = strlen(form);
1015 size_t lm = strlen(lenmod);
1016 char spec = form[l - 1];
1017 strcpy(form + l - 1, lenmod);
1018 form[l + lm - 1] = spec;
1019 form[l + lm] = '\0';
1020}
1021
1022
1023static int str_format (lua_State *L) {

Callers 1

str_formatFunction · 0.85

Calls 1

strlenFunction · 0.85

Tested by

no test coverage detected