Mail Archives: djgpp/1998/09/26/13:47:03
Message-ID: | <002501bde975$df1e6b00$44f703cc@enterprise-z>
|
From: | "Jorge Ivan Meza Martinez" <jimeza AT usa DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | string handling question
|
Date: | Sat, 26 Sep 1998 12:48:15 -0500
|
MIME-Version: | 1.0
|
Hello,
I have a question about Strings, I want to know if I can do something like
....
with sprintf I can do something like:
char buffer[256];
sprintf ( buffer, "the string one is %s and the second is %s", string1,
string2 );
and my buffer will be "the string one is 'whatever1' and the second is
'whatever2'"
but what if I need the opposite ?
I have:
char buffer[256];
char source = "the string one is 'whatever1' and the second is 'whatever2'";
X ( buffer, source, "the string one is %s and the second is %s'", string1,
string2 );
and in my string1 should be stored 'whatever1' and in string2 'whatever2'.
does an easy way exists in C or C++ ?
thanks,
Jorge Ivan Meza Martinez
jimeza AT usa DOT net
jimezam AT armenia DOT multi DOT net DOT co
jimeza.home.ml.org
- Raw text -