Topic: STL: string and Left method
Author: nimel@my-deja.com
Date: 1999/11/27 Raw View
In article <81g613$as4$1@nnrp1.deja.com>,
sedlar@my-deja.com wrote:
> I have
> previously used the Left, Mid and Right methods
> in MFC.
>
> I have not found any similar methods for the
> string class.
Check out the string.substr() member function.
/Niklas Mellin
Sent via Deja.com http://www.deja.com/
Before you buy.
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: sedlar@my-deja.com
Date: 1999/11/26 Raw View
I am changing an old application and have then
choosen to use the string class available in
Standard C++. The code includes some parsing of
strings and retrieving parts of it, I have
previously used the Left, Mid and Right methods
in MFC.
I have not found any similar methods for the
string class. I have tried the copy method but it
does not add terminating 0. As the standard
includes lots of generic stuff it is hard to know
if there is some algorithm, iterator, etc. than
can be used as replacement for Left, Right and
Mid.
Is there anyone that can provide me with some
information?
/Mattias Lindberg
Sent via Deja.com http://www.deja.com/
Before you buy.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]