public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Q] Cleaning string whitespace trimming. Does it make any sense?
Date: Tue, 12 Jun 2012 18:49:55 +0000	[thread overview]
Message-ID: <20120612184955.GN13539@mwanda> (raw)
In-Reply-To: <CALF0-+V15wjFhZH5P1C+4sJ9QSw7QY5Rk383S4XhVVCBsnXUQw@mail.gmail.com>

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


  reply	other threads:[~2012-06-12 18:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 17:52 [Q] Cleaning string whitespace trimming. Does it make any sense? Ezequiel Garcia
2012-06-12 18:49 ` Dan Carpenter [this message]
2012-06-12 20:58 ` Dan Carpenter
2012-06-12 22:03 ` Ezequiel Garcia
2012-06-13  6:06 ` Dan Carpenter
2012-06-13  7:23 ` walter harms
2012-06-13 17:06 ` Ezequiel Garcia
2012-06-13 18:16 ` Ezequiel Garcia
2012-06-13 18:21 ` Dan Carpenter
2012-06-13 18:30 ` Ezequiel Garcia
2012-06-13 18:37 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120612184955.GN13539@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox