mirror of
https://github.com/php/doc-de.git
synced 2026-04-23 23:18:24 +02:00
9f36f8435c
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@115614 c90b9560-bf6c-de11-be94-00142212c4b1
89 lines
2.7 KiB
XML
89 lines
2.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- EN-Revision: 1.4 Maintainer: tom Status: ready -->
|
|
<!-- CREDITS: tschuer -->
|
|
<refentry id="function.strstr">
|
|
<refnamediv>
|
|
<refname>strstr</refname>
|
|
<refpurpose>Sucht erstes Vorkommen des Suchstrings und liefert den Reststring</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Beschreibung</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>strstr</methodname>
|
|
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gibt den String <parameter>haystack</parameter> ab dem ersten
|
|
Vorkommen von <parameter>needle</parameter> bis zum Ende zurück.
|
|
</para>
|
|
<para>
|
|
Falls <parameter>needle</parameter> nicht gefunden wird, ist das
|
|
Ergebnis &false;.
|
|
</para>
|
|
<para>
|
|
Ist <parameter>needle</parameter> kein String, wird er zu einem
|
|
Integer-Wert umgesetzt und als das diesem Wert entsprechende
|
|
ASCII-Zeichen angesehen.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Diese Funktion unterscheidet zwischen Groß- und Kleinschreibung.
|
|
Ist keine Unterscheidung gewünscht / erforderlich, sollten Sie
|
|
<function>stristr</function> verwenden.
|
|
</para>
|
|
</note>
|
|
<para>
|
|
<example>
|
|
<title><function>strstr</function> Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
$email = 'user@example.com';
|
|
$domain = strstr($email, '@');
|
|
print $domain; // Ausgabe: @example.com
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<note>
|
|
<para>
|
|
Wenn Sie nur herausfinden möchten, ob ein bestimmter
|
|
<parameter>needle</parameter> innerhalb von
|
|
<parameter>haystack</parameter> vorkommt, verwenden Sie stattdessen
|
|
die schnellere und weniger speicherintesive Funktion
|
|
<function>strpos</function>.
|
|
</para>
|
|
</note>
|
|
</para>
|
|
<para>
|
|
Siehe auch <function>ereg</function>, <function>preg_match</function>,
|
|
<function>strchr</function>, <function>stristr</function>,
|
|
<function>strpos</function>, <function>strrchr</function> und
|
|
<function>substr</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|