char* removeMiddleStar(char *str)
{
if (!str)
return str;
char *p = str;
for(; *p == '*'; ++p);
char *q = p;
while(*++q != '\0');
while(*--q == '*');
for (char *k = p; *k != '\0'; ++k)
if ((k < q && *k != '*') || k >= q)
*p++ = *k;
*p = '\0';
return str;
}