<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Letzten Buchstaben von string ändern]]></title><description><![CDATA[<p>Hi,<br />
wie oben schon steht, möchte ich den letzten buchstaben von einem String ändern. Ich könnte natürlich den string in ein char-Array umwandeln, dann das letzte ändern und wieder speicher, aber ich schätze mal, das wär nicht so elegant. Hab es auch schon mit at probiert, aber auch das hat leider nicht geklappt. Habt ihr ein Tipp für mich?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/146931/letzten-buchstaben-von-string-ändern</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 21:35:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/146931.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 May 2006 08:06:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:06:58 GMT]]></title><description><![CDATA[<p>Hi,<br />
wie oben schon steht, möchte ich den letzten buchstaben von einem String ändern. Ich könnte natürlich den string in ein char-Array umwandeln, dann das letzte ändern und wieder speicher, aber ich schätze mal, das wär nicht so elegant. Hab es auch schon mit at probiert, aber auch das hat leider nicht geklappt. Habt ihr ein Tipp für mich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1056159</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056159</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Fri, 12 May 2006 08:06:58 GMT</pubDate></item><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:09:07 GMT]]></title><description><![CDATA[<p>In C(++) beginnen Array-Indizes bei 0, also ist hat das letzte Element den Index &quot;Länge-1&quot; (auf Position &quot;Länge&quot; steht bei Strings das abschließende \0).</p>
<pre><code class="language-cpp">string str=&quot;Test&quot;;
str[str.size()-1] = &quot;x&quot;;
cout&lt;&lt;str;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1056162</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056162</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 12 May 2006 08:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:09:17 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">text[text.length()-1]='n';
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1056163</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056163</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Fri, 12 May 2006 08:09:17 GMT</pubDate></item><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:45:45 GMT]]></title><description><![CDATA[<p>hmm, hat jemand vlt noch eine schicke möglichkeit, chars so zu erhöhen, dass nur zahlen und buchstaben möglich sind? Ich würde das mit tausenden von ifs und elses machen, aber das ist ja eigentlich auch nicht so das ware...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1056211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056211</guid><dc:creator><![CDATA[MaxDemian]]></dc:creator><pubDate>Fri, 12 May 2006 08:45:45 GMT</pubDate></item><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:50:56 GMT]]></title><description><![CDATA[<p>MaxDemian schrieb:</p>
<blockquote>
<p>hmm, hat jemand vlt noch eine schicke möglichkeit, chars so zu erhöhen, dass nur zahlen und buchstaben möglich sind? Ich würde das mit tausenden von ifs und elses machen, aber das ist ja eigentlich auch nicht so das ware...</p>
</blockquote>
<p>Benutz mal die &quot;Suche&quot; hier gab es schon öfters Themen in denen genau das gefragt wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1056219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056219</guid><dc:creator><![CDATA[EEK]]></dc:creator><pubDate>Fri, 12 May 2006 08:50:56 GMT</pubDate></item><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:52:02 GMT]]></title><description><![CDATA[<p>Schau doch mal nach isalpha, isdigit etc.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1056222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056222</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 12 May 2006 08:52:02 GMT</pubDate></item><item><title><![CDATA[Reply to Letzten Buchstaben von string ändern on Fri, 12 May 2006 08:59:58 GMT]]></title><description><![CDATA[<p>LordJaxom schrieb:</p>
<blockquote>
<pre><code class="language-cpp">text[text.length()-1]='n';
</code></pre>
</blockquote>
<p>Oder:</p>
<pre><code class="language-cpp">*text.rbegin() = 'x';
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1056236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1056236</guid><dc:creator><![CDATA[HumeSikkins]]></dc:creator><pubDate>Fri, 12 May 2006 08:59:58 GMT</pubDate></item></channel></rss>