MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / string_substr

Function string_substr

StereoKitC/libraries/stref.cpp:59–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57///////////////////////////////////////////
58
59char *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

Callers 1

file_picker_open_folderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected