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: Wed, 13 Jun 2012 18:21:17 +0000	[thread overview]
Message-ID: <20120613182117.GU13539@mwanda> (raw)
In-Reply-To: <CALF0-+V15wjFhZH5P1C+4sJ9QSw7QY5Rk383S4XhVVCBsnXUQw@mail.gmail.com>

On Wed, Jun 13, 2012 at 03:16:24PM -0300, Ezequiel Garcia wrote:
> Dan,
> 
> On Tue, Jun 12, 2012 at 5:58 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > Actually, on second thought strim() already does what we want.  Just
> > ignore the return value.
> >
> 
> If I *only* want to remove trailing whitespace, using strim() does the job
> but it *also* tries to remove leading whitespace.
> 
> That can't hurt, but it also doesn't hurt to add a separate function
> for that, right?

It returns a pointer to the first non whitespace character, but you
can just ignore the return value.  Normally the first character is
going to be non whitespace, so it's not even a slow down.

regards,
dan carpenter

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

  parent reply	other threads:[~2012-06-13 18:21 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
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 [this message]
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=20120613182117.GU13539@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