cvs: phpdoc-de /reference/strings/functions stristr.xml

From: Date: Thu, 25 Aug 2005 19:04:43 +0000
Subject: cvs: phpdoc-de /reference/strings/functions stristr.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-1398@lists.php.net to get a copy of this message
theseer Thu Aug 25 15:04:43 2005 EDT Modified files: /phpdoc-de/reference/strings/functions stristr.xml Log: #32489 fixed - weitere Beispiele übernommen http://cvs.php.net/diff.php/phpdoc-de/reference/strings/functions/stristr.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-de/reference/strings/functions/stristr.xml diff -u phpdoc-de/reference/strings/functions/stristr.xml:1.5 phpdoc-de/reference/strings/functions/stristr.xml:1.6 --- phpdoc-de/reference/strings/functions/stristr.xml:1.5 Mon Feb 10 15:22:58 2003 +++ phpdoc-de/reference/strings/functions/stristr.xml Thu Aug 25 15:04:42 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- EN-Revision: 1.4 Maintainer: tom Status: ready --> <!-- CREDITS: tschuer --> <refentry id="function.stristr"> @@ -18,9 +18,10 @@ <methodparam><type>string</type><parameter>needle</parameter></methodparam> </methodsynopsis> <para> - Findet alle Vorkommen von <parameter>needle</parameter> innerhalb - von <parameter>haystack</parameter> vom Anfang bis zum Ende (ohne - Rücksicht auf die Schreibweise beider Parameter). + Gibt den String <parameter>haystack</parameter> ab dem ersten Vorkommen + von <parameter>needle</parameter> bis zum Ende zurück. Der Wert von + <parameter> needle</parameter> wird in <parameter>haystack</parameter> + ohne Rücksicht auf die Schreibweise (Groß- und Kleinschreibung) gesucht. </para> <para> Wird <parameter>needle</parameter> nicht gefunden, wird &false; @@ -33,7 +34,7 @@ </para> <para> <example> - <title><function>stristr</function> example</title> + <title><function>stristr</function> Verwendung</title> <programlisting role="php"> <![CDATA[ <?php @@ -46,6 +47,40 @@ </programlisting> </example> </para> + + <para> + <example> + <title>Prüfen, ob ein String gefunden wurde oder nicht</title> + <programlisting role="php"> +<![CDATA[ +<?php + $string = 'Hallo Welt!'; + if(stristr($string, 'Erde') === FALSE) { + echo '"Erde" nicht gefunden'; + } +// Ausgabe: "Erde" nicht gefunden +?> +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>Unter Verwendung eines Integer-Wertes</title> + <programlisting role="php"> +<![CDATA[ +<?php + $string = 'APFEL'; + echo stristr($string, 97); // 97 = kleines a +// Ausgabe: APFEL +?> +]]> + </programlisting> + </example> + </para> + + &note.bin-safe; + <para> Siehe auch <function>strchr</function>, <function>strrchr</function>, <function>substr</function> und

« previous php.doc.de (#1398) next »