MCPcopy Create free account
hub / github.com/cococry/leif / substr_str

Function substr_str

leif.c:1488–1492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1486}
1487
1488void substr_str(const char* str, int start_index, int end_index, char* substring) {
1489 int substring_length = end_index - start_index + 1;
1490 strncpy(substring, str + start_index, substring_length);
1491 substring[substring_length] = '\0';
1492}
1493
1494int map_vals(int value, int from_min, int from_max, int to_min, int to_max) {
1495 return (value - from_min) * (to_max - to_min) / (from_max - from_min) + to_min;

Callers 1

input_fieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected