MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / StringVector_containsPath

Function StringVector_containsPath

Tools/ToolsBootstrap.c:474–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472 }
473 memcpy(sb->buffer + sb->length, str, len + 1);
474 sb->length += len;
475}
476
477char* StringBuilder_get_buffer(StringBuilder* sb) {
478 return sb->buffer;
479}
480
481// StringVector utilities
482void StringVector_init(StringVector* sv, size_t initial_capacity) {
483 sv->data = NULL;
484 sv->count = 0;
485 sv->capacity = initial_capacity > 0 ? initial_capacity : 8;
486 if (sv->capacity > 0) {
487 sv->data = (char**)malloc(sizeof(char*) * sv->capacity);
488 if (!sv->data) sv->capacity = 0;
489 }
490}
491
492void StringVector_destroy(StringVector* sv) {
493 if (sv->data) {
494 for (size_t i = 0; i < sv->count; ++i) {
495 if (sv->data[i]) free(sv->data[i]);
496 }

Callers 2

needsRebuildToolsFunction · 0.85
needsRebuildToolObjFunction · 0.85

Calls 1

Tested by

no test coverage detected