Re: [Q] Cleaning string whitespace trimming. Does it make any sense?

Dan Carpenter
2012-06-12T18:49:55Z

We already have strim() which removes leading and trailing
whitespace. But sure, that sounds like a good idea. It would go in
front of strim() and strim would call it first then strim() would
look like this:

char *strim(char *s)
{
trim_trailing(s);
return skip_spaces(s);
}

Good luck on getting everyone to agree on a name for your function.
Python uses rstrip() for this. CC Andrew Morton and lkml when you
have a patch ready.

regards,
dan carpenter