cgen.c
char *trim(char *str)
{
	char *start = str;
	while (isspace(*start)) start++;

	if (*start == '\0') return start;

	char *end = start + strlen(start) - 1;
	while (isspace(*end)) end--;

	*(end + 1) = '\0';
	
	return start;
}
/* trim removes leading and trailing whitespace and returns the trimmed string. The argument string is modified. str must have a null terminator */
trim removes leading and trailing whitespace and returns the trimmed string. The argument string is modified. str must have a null terminator
trim removes leading and trailing whitespace and returns the trimmed string . The argument string is modified . str must have a null terminator
char *trim(char *str)
{
	char *start = str;
	while (isspace(*start)) start++;
	if (*start == '\0') return start;
	char *end = start + strlen(start) - 1;
	while (isspace(*end)) end--;
	*(end + 1) = '\0';
	return start;
}
char * trim ( char * str ) { char * start = str ; while ( isspace ( * start ) ) start ++ ; if ( * start == ' \0 ' ) return start ; char * end = start + strlen ( start ) - 1 ; while ( isspace ( * end ) ) end -- ; * ( end + 1 ) = ' \0 ' ; return start ; }
trim removes leading and trailing whitespace and returns the trimmed string.
trim removes leading and trailing whitespace and returns the trimmed string .