while(*cur)
++cur;
- while(white_char[(unsigned char)*cur] && (cur >= s))
+ while((cur >= s) && white_char[(unsigned char)*cur])
--cur;
*++cur = '\0';
while(*cur && white_char[(unsigned char)*cur])
++cur;
- return strcpy(s,cur);
+ return memmove(s,cur, strlen(cur));
}
/** @brief Strip whitespace (or other characters) from the end and the begining of a string.