Changeset 16 in Main for trunk/Common


Ignore:
Timestamp:
Sep 14, 2024, 12:09:52 AM (2 months ago)
Author:
Nishi
Message:

can parse http now

Location:
trunk/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/cm_string.h

    r5 r16  
    77
    88char* cm_strcat(const char* a, const char* b);
     9char* cm_strcat3(const char* a, const char* b, const char* c);
    910char* cm_strdup(const char* str);
    1011char* cm_trimstart(const char* str);
  • trunk/Common/string.c

    r6 r16  
    1111        memcpy(str + strlen(a), b, strlen(b));
    1212        str[strlen(a) + strlen(b)] = 0;
     13        return str;
     14}
     15
     16char* 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);
    1320        return str;
    1421}
Note: See TracChangeset for help on using the changeset viewer.