wish_app_deps/wish_utils.c
char* my_strdup(const char* str) {
    /* Length of the string, plus null byte */
    int len = strlen(str) + 1;
    char* copy = (char*) wish_platform_malloc(len);
    if (copy) {
        memset(copy, 0, len);
        memcpy(copy, str, len);
    }
    return copy;
}
/* A private implementation of the C library "strdup" function, which is
 * unavailable on the current ESP SDK
 *
 */
A private implementation of the C library "strdup" function, which is
unavailable on the current ESP SDK
A private implementation of the C library " strdup " function which is unavailable on the current ESP SDK
char* my_strdup(const char* str) {
    int len = strlen(str) + 1;
    char* copy = (char*) wish_platform_malloc(len);
    if (copy) {
        memset(copy, 0, len);
        memcpy(copy, str, len);
    }
    return copy;
}
char * my_strdup ( const char * str ) { int len = strlen ( str ) + 1 ; char * copy = ( char * ) wish_platform_malloc ( len ) ; if ( copy ) { memset ( copy , 0 , len ) ; memcpy ( copy , str , len ) ; } return copy ; }
A private implementation of the C library "strdup" function, which is
 unavailable on the current ESP SDK
A private implementation of the C library " strdup " function which is unavailable on the current ESP SDK
/* Length of the string, plus null byte */