| 57 | /////////////////////////////////////////// |
| 58 | |
| 59 | char *string_substr(const char *a, uint32_t start, uint32_t length) { |
| 60 | if (length == 0) return nullptr; |
| 61 | |
| 62 | char *result = (char *)STR_MALLOC(length + 1); |
| 63 | if (result != nullptr) { |
| 64 | memcpy(result, a + start, length); |
| 65 | result[length] = '\0'; |
| 66 | } |
| 67 | return result; |
| 68 | } |
| 69 | |
| 70 | /////////////////////////////////////////// |
| 71 |
no outgoing calls
no test coverage detected