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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux