MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_str_tolower

Function cbm_str_tolower

src/foundation/str_util.c:158–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158char *cbm_str_tolower(CBMArena *a, const char *s) {
159 if (!s) {
160 return NULL;
161 }
162 size_t len = strlen(s);
163 char *result = (char *)cbm_arena_alloc(a, len + SKIP_ONE);
164 if (!result) {
165 return NULL;
166 }
167 for (size_t i = 0; i < len; i++) {
168 result[i] = (char)tolower((unsigned char)s[i]);
169 }
170 result[len] = '\0';
171 return result;
172}
173
174char *cbm_str_replace_char(CBMArena *a, const char *s, char from, char to) {
175 if (!s) {

Callers 1

test_str_util.cFile · 0.85

Calls 1

cbm_arena_allocFunction · 0.70

Tested by

no test coverage detected