Changeset 16 in Main for trunk/Common
- Timestamp:
- Sep 14, 2024, 12:09:52 AM (2 months ago)
- Location:
- trunk/Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/cm_string.h
r5 r16 7 7 8 8 char* cm_strcat(const char* a, const char* b); 9 char* cm_strcat3(const char* a, const char* b, const char* c); 9 10 char* cm_strdup(const char* str); 10 11 char* cm_trimstart(const char* str); -
trunk/Common/string.c
r6 r16 11 11 memcpy(str + strlen(a), b, strlen(b)); 12 12 str[strlen(a) + strlen(b)] = 0; 13 return str; 14 } 15 16 char* cm_strcat3(const char* a, const char* b, const char* c) { 17 char* tmp = cm_strcat(a, b); 18 char* str = cm_strcat(tmp, c); 19 free(tmp); 13 20 return str; 14 21 }
Note:
See TracChangeset
for help on using the changeset viewer.