I've been C# developer. 

But Now I have to write C code. 

I used to use `String.IsNullOrEmpty()` for preventing Errors and assign a new string.

I hope to write C code to act like String.IsNullOrEmpty. and assign a new string

so I wrote some sample code. 

```
static char *pCtvUrl;

void set_app_url(const char* appUrl){
     if(!appUrl || !*appUrl)
         return;
     pCtvUrl = malloc(sizeof(appUrl));
     strcpy(pCtvUrl,appUrl);
}

```

I want to check if this is correct or not. 

If you know better way to solve, please give me some advice.

thanks