cvs: phpdoc-fr /reference/strings/functions substr-compare.xml

From: Date: Mon, 26 Apr 2004 18:00:12 +0000
Subject: cvs: phpdoc-fr /reference/strings/functions substr-compare.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-2342@lists.php.net to get a copy of this message
didou Mon Apr 26 14:00:12 2004 EDT Modified files: /phpdoc-fr/reference/strings/functions substr-compare.xml Log: initial docs, sync with en http://cvs.php.net/diff.php/phpdoc-fr/reference/strings/functions/substr-compare.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-fr/reference/strings/functions/substr-compare.xml diff -u phpdoc-fr/reference/strings/functions/substr-compare.xml:1.5 phpdoc-fr/reference/strings/functions/substr-compare.xml:1.6 --- phpdoc-fr/reference/strings/functions/substr-compare.xml:1.5 Wed Feb 25 09:00:11 2004 +++ phpdoc-fr/reference/strings/functions/substr-compare.xml Mon Apr 26 14:00:10 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.2 Maintainer: didou Status: ready --> <refentry id="function.substr-compare"> <refnamediv> <refname>substr_compare</refname> @@ -18,9 +18,40 @@ <methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>case_sensitivity</parameter></methodparam> </methodsynopsis> - - &warn.undocumented.func; - + <para> + <function>substr_compare</function> compare <parameter>main_str</parameter> + à partir de la position <parameter>offset</parameter> avec <parameter>str</parameter> + pendant <parameter>length</parameter> caractères. + </para> + <para> + Cette fonction retourne &lt; 0 si <parameter>main_str</parameter> à partir de + <parameter>offset</parameter> est inférieur à <parameter>str</parameter>, &gt; + 0 si il est plus grand que <parameter>str</parameter>, et 0 si ils sont égaux. + Si <parameter>length</parameter> est égal ou plus grand que la taille de + <parameter>main_str</parameter> et que <parameter>length</parameter> est configuré, + <function>substr_compare</function> affiche un warning et retourne &false;. + </para> + <para> + Si <parameter>case_sensitivity</parameter> est à &true;, la comparaison est + sensible à la casse. + </para> + <para> + <example> + <title>Exemple avec <function>substr_compare</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +echo substr_compare("abcde", "bc", 1, 2); // 0 +echo substr_compare("abcde", "bcg", 1, 2); // 0 +echo substr_compare("abcde", "BC", 1, 2, true); // 0 +echo substr_compare("abcde", "bc", 1, 3); // 1 +echo substr_compare("abcde", "cd", 1, 2); // -1 +echo substr_compare("abcde", "abc", 5, 1); // warning +?> +]]> + </programlisting> + </example> + </para> </refsect1> </refentry>

« previous php.doc.fr (#2342) next »