1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-29 10:42:12 +02:00
Files
archived-doc-de/reference/strings/functions/strstr.xml
Carola 'Sammy' Kummert 5e2c776caf updated to current english versions
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@212371 c90b9560-bf6c-de11-be94-00142212c4b1
2006-05-03 17:27:08 +00:00

92 lines
2.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- EN-Revision: 1.8 Maintainer: sammywg Status: ready -->
<refentry id="function.strstr">
<refnamediv>
<refname>strstr</refname>
<refpurpose>Findet das erste Vorkommen eines Strings</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 Teil von <parameter>haystack</parameter> ab dem ersten
Vorkommen von <parameter>needle</parameter> bis zum Ende von
<parameter>haystack</parameter> zurück.
</para>
<para>
Falls <parameter>needle</parameter> nicht gefunden wird, wird &false;
zurückgegeben.
</para>
<para>
Ist <parameter>needle</parameter> kein String, wird der Parameter in einen
Integerwert konvertiert, der dem Ordinalwert des Zeichens entspricht.
</para>
<note>
<para>
Diese Funktion unterscheidet zwischen Groß- und Kleinschreibung.
Soll die Suche nicht zwischen Groß- und Kleinschreibung unterscheiden,
verwenden Sie <function>stristr</function>.
</para>
</note>
<para>
<example>
<title><function>strstr</function> Beispiel</title>
<programlisting role="php">
<![CDATA[
<?php
$email = 'user@example.com';
$domain = strstr($email, '@');
echo $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 speicherintensive Funktion
<function>strpos</function>.
</para>
</note>
</para>
<para>
<function>strstr</function> ist binary safe seit PHP 4.3.0
</para>
<para>
Siehe auch <function>ereg</function>, <function>preg_match</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
-->