 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Stefanie Krusche Guest
|
Posted: Wed Nov 12, 2003 12:25 pm Post subject: Stringsverarbeitung |
|
|
Hallo!
Wie kann ich denn einem neuen String nur ein Teil von einem anderen
String zuweisen? Wie z.B. in Matlab: str2=str1[1:5].
Vielen Dank fuer die Hilfe,
Stefanie Krusche
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
Stefan Reuther Guest
|
Posted: Wed Nov 12, 2003 1:03 pm Post subject: Re: Stringsverarbeitung |
|
|
Stefanie Krusche <s.krusche (AT) gmx (DOT) de> wrote:
| Quote: | Wie kann ich denn einem neuen String nur ein Teil von einem anderen
String zuweisen? Wie z.B. in Matlab: str2=str1[1:5].
|
str2 = str1.substr(0, 5);
str2.assign(str1, 0, 5);
Stefan
--
de.comp.lang.iso-c++ - Moderation: mailto:voyager+mod (AT) bud (DOT) prima.de
FAQ: http://www.voyager.prima.de/cpp/ mailto:voyager+send-faq (AT) bud (DOT) prima.de
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|