<?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[Stringlänge ermitteln]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich möchte die Länge eines Strings ermitteln. Ich würde dies folgendermaßen tun:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int strlength(string str)
{
    int i=0;
    do
    {
        i++;
    } while (!str[i]==NULL);
    return i;
}

int main()
{
    string str = &quot;Rainer Zufall&quot;;
    cout &lt;&lt; strlength(str);
	return 0;
}
</code></pre>
<p>...kann mir aber nicht vorstellen, dass das der einzige Weg ist. Gibt es da nicht schon irgendwo eine Funktion für?</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/139229/stringlänge-ermitteln</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 10:38:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/139229.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Mar 2006 17:27:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stringlänge ermitteln on Sat, 04 Mar 2006 17:27:21 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich möchte die Länge eines Strings ermitteln. Ich würde dies folgendermaßen tun:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int strlength(string str)
{
    int i=0;
    do
    {
        i++;
    } while (!str[i]==NULL);
    return i;
}

int main()
{
    string str = &quot;Rainer Zufall&quot;;
    cout &lt;&lt; strlength(str);
	return 0;
}
</code></pre>
<p>...kann mir aber nicht vorstellen, dass das der einzige Weg ist. Gibt es da nicht schon irgendwo eine Funktion für?</p>
<p>Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1008634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1008634</guid><dc:creator><![CDATA[ichbinanfaenger]]></dc:creator><pubDate>Sat, 04 Mar 2006 17:27:21 GMT</pubDate></item><item><title><![CDATA[Reply to Stringlänge ermitteln on Sat, 04 Mar 2006 17:50:00 GMT]]></title><description><![CDATA[<p><a href="http://www.sgi.com/tech/stl/basic_string.html" rel="nofollow">http://www.sgi.com/tech/stl/basic_string.html</a></p>
<p>Meld dich, wenn du was gefunden hast :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1008653</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1008653</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Sat, 04 Mar 2006 17:50:00 GMT</pubDate></item><item><title><![CDATA[Reply to Stringlänge ermitteln on Sat, 04 Mar 2006 17:51:33 GMT]]></title><description><![CDATA[<p>Oder auch hier: <a href="http://www.cppreference.com/cppstring/index.html" rel="nofollow">http://www.cppreference.com/cppstring/index.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1008654</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1008654</guid><dc:creator><![CDATA[michba]]></dc:creator><pubDate>Sat, 04 Mar 2006 17:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to Stringlänge ermitteln on Sat, 04 Mar 2006 17:56:29 GMT]]></title><description><![CDATA[<p>Vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1008660</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1008660</guid><dc:creator><![CDATA[ichbinanfaenger]]></dc:creator><pubDate>Sat, 04 Mar 2006 17:56:29 GMT</pubDate></item></channel></rss>