while (s != t && isspace(s[-1])) {
while (s != t && isspace(CharOf(s[-1]))) {
x_strtrim(char *s){    char *base = s;    char *d;    if (s != 0 && *s != '\0') {	char *t = x_strdup(base);	s = t;	d = s;	while (isspace(*s)) {	    ++s;	}	while ((*d++ = *s++) != '\0') {	    ;	}	if (*t != '\0') {	    s = t + strlen(t);	    while (s != t && isspace(s[-1])) {		*--s = '\0';	    }	}	if (!strcmp(t, base)) {	    free(t);	} else {	    base = t;	}    }    return base;}