From: Bert Wesarg <bert.wesarg@googlemail.com>
To: fundu_1999@yahoo.com
Cc: linux-c-programming@vger.kernel.org
Subject: Re: strstr and strchr
Date: Tue, 17 Feb 2009 12:58:36 +0100 [thread overview]
Message-ID: <36ca99e90902170358m1e0fc809p1da7a1603185e005@mail.gmail.com> (raw)
In-Reply-To: <937267.9085.qm@web63401.mail.re1.yahoo.com>
On Tue, Feb 17, 2009 at 12:52, Fundu <fundu_1999@yahoo.com> wrote:
> Bert,
> i did try that but got same response.
I'm not:
int
main(int ac, char *av[])
{
char *str = "<Info firstName='sam' lastName='Smith' />";
char *ptr = strchr(str, '\'');
if (!ptr)
return 1;
printf("%s\n", str);
printf("%*s^\n", (int)(ptr - str), "");
return 0;
}
prints:
<Info firstName='sam' lastName='Smith' />
^
next prev parent reply other threads:[~2009-02-17 11:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 8:30 strstr and strchr Fundu
2009-02-17 10:48 ` Bert Wesarg
2009-02-17 11:52 ` Fundu
2009-02-17 11:58 ` Bert Wesarg [this message]
2009-02-17 12:00 ` Bert Wesarg
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=36ca99e90902170358m1e0fc809p1da7a1603185e005@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=fundu_1999@yahoo.com \
--cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).