[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/strings/functions/_stripos.xml_strpos.xml_strrip
From:       Matt_Li <mazzanet () php ! net>
Date:       2011-12-25 2:27:36
Message-ID: svn-mazzanet-1324780056-321383-1657028435 () svn ! php ! net
[Download RAW message or body]

mazzanet                                 Sun, 25 Dec 2011 02:27:36 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=321383

Log:
Fix as per note #106986 and unify format between related functions

Bug: https://bugs.php.net/106986 (error getting bug information)
      
Changed paths:
    U   phpdoc/en/trunk/reference/strings/functions/stripos.xml
    U   phpdoc/en/trunk/reference/strings/functions/strpos.xml
    U   phpdoc/en/trunk/reference/strings/functions/strripos.xml
    U   phpdoc/en/trunk/reference/strings/functions/strrpos.xml
    U   phpdoc/en/trunk/reference/strings/functions/strstr.xml


["svn-diffs-321383.txt" (text/x-diff)]

Modified: phpdoc/en/trunk/reference/strings/functions/stripos.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/stripos.xml	2011-12-25 00:52:26 UTC \
                (rev 321382)
+++ phpdoc/en/trunk/reference/strings/functions/stripos.xml	2011-12-25 02:27:36 UTC \
(rev 321383) @@ -3,7 +3,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stripos">
  <refnamediv>
   <refname>stripos</refname>
-  <refpurpose>Find position of first occurrence of a case-insensitive \
string</refpurpose> +  <refpurpose>Find the position of the first occurrence of a \
case-insensitive substring in a string</refpurpose>  </refnamediv>

  <refsect1 role="description">
@@ -15,12 +15,11 @@
    <methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
  </methodsynopsis>
   <para>
-   Returns the numeric position of the first occurrence of
-   <parameter>needle</parameter> in the <parameter>haystack</parameter>
-   <type>string</type>.
+   Find the numeric position of the last occurrence of
+   <parameter>needle</parameter> in the <parameter>haystack</parameter> string.
   </para>
   <para>
-   Unlike <function>strpos</function>, <function>stripos</function> is
+   Unlike the <function>strpos</function>, <function>stripos</function> is
    case-insensitive.
   </para>
  </refsect1>
@@ -33,7 +32,7 @@
      <term><parameter>haystack</parameter></term>
      <listitem>
       <para>
-       The string to search in
+       The string to search in.
       </para>
      </listitem>
     </varlistentry>
@@ -54,10 +53,9 @@
      <term><parameter>offset</parameter></term>
      <listitem>
       <para>
-       The optional <parameter>offset</parameter> parameter allows you
-       to specify which character in <parameter>haystack</parameter> to
-       start searching. The position returned is still relative to the
-       beginning of <parameter>haystack</parameter>.
+       If specified, search will start this number of characters counted from
+       the beginning of the string. Unlike <function>strrpos</function> and
+       <function>strripos</function>, the offset cannot be negative.
       </para>
      </listitem>
     </varlistentry>
@@ -68,9 +66,13 @@
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   Returns the position as an integer. If <parameter>needle</parameter> is not \
                found,
-   <function>stripos</function> will return <type>boolean</type> &false;.
+   Returns the position of where the needle exists relative to the beginnning of
+   the <parameter>haystack</parameter> string (independent of offset).
+   Also note that string positions start at 0, and not 1.
   </para>
+  <para>
+   Returns &false; if the needle was not found.
+  </para>
   &return.falseproblem;
  </refsect1>


Modified: phpdoc/en/trunk/reference/strings/functions/strpos.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/strpos.xml	2011-12-25 00:52:26 UTC \
                (rev 321382)
+++ phpdoc/en/trunk/reference/strings/functions/strpos.xml	2011-12-25 02:27:36 UTC \
(rev 321383) @@ -3,7 +3,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strpos">
  <refnamediv>
   <refname>strpos</refname>
-  <refpurpose>Find position of first occurrence of a string</refpurpose>
+  <refpurpose>Find the position of the first occurrence of a substring in a \
string</refpurpose>  </refnamediv>

  <refsect1 role="description">
@@ -15,9 +15,8 @@
    <methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
  </methodsynopsis>
   <para>
-   Returns the numeric position of the first occurrence of
-   <parameter>needle</parameter> in the <parameter>haystack</parameter>
-   string.
+   Find the numeric position of the last occurrence of
+   <parameter>needle</parameter> in the <parameter>haystack</parameter> string.
   </para>
  </refsect1>

@@ -46,10 +45,9 @@
      <term><parameter>offset</parameter></term>
      <listitem>
       <para>
-       The optional <parameter>offset</parameter> parameter allows you
-       to specify which character in <parameter>haystack</parameter> to
-       start searching. The position returned is still relative to the
-       beginning of <parameter>haystack</parameter>.
+       If specified, search will start this number of characters counted from
+       the beginning of the string. Unlike <function>strrpos</function> and
+       <function>strripos</function>, the offset cannot be negative.
       </para>
      </listitem>
     </varlistentry>
@@ -60,10 +58,13 @@
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   Returns the position as an integer. If <parameter>needle</parameter> is
-   not found, <function>strpos</function> will return <type>boolean</type>
-   &false;.
+   Returns the position of where the needle exists relative to the beginnning of
+   the <parameter>haystack</parameter> string (independent of offset).
+   Also note that string positions start at 0, and not 1.
   </para>
+  <para>
+   Returns &false; if the needle was not found.
+  </para>
   &return.falseproblem;
  </refsect1>


Modified: phpdoc/en/trunk/reference/strings/functions/strripos.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/strripos.xml	2011-12-25 00:52:26 UTC \
                (rev 321382)
+++ phpdoc/en/trunk/reference/strings/functions/strripos.xml	2011-12-25 02:27:36 UTC \
(rev 321383) @@ -3,7 +3,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strripos">
  <refnamediv>
   <refname>strripos</refname>
-  <refpurpose>Find position of last occurrence of a case-insensitive string in a \
string</refpurpose> +  <refpurpose>Find the position of the last occurrence of a \
case-insensitive substring in a string</refpurpose>  </refnamediv>

  <refsect1 role="description">
@@ -15,8 +15,11 @@
    <methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
  </methodsynopsis>
   <para>
-   Find position of last occurrence of a string in a string. Unlike
-   <function>strrpos</function>, <function>strripos</function> is
+   Find the numeric position of the last occurrence of
+   <parameter>needle</parameter> in the <parameter>haystack</parameter> string.
+  </para>
+  <para>
+   Unlike the <function>strrpos</function>, <function>strripos</function> is
    case-insensitive.
   </para>
  </refsect1>
@@ -46,9 +49,9 @@
      <term><parameter>offset</parameter></term>
      <listitem>
       <para>
-       If specified, search will stop this number of characters counted from the
+       If specified, search will start this number of characters counted from the
        beginning of the string. If the value is negative, search will instead start
-       from that many characters from the end of the string.
+       from that many characters from the end of the string, searching backwards.
       </para>
      </listitem>
     </varlistentry>
@@ -59,12 +62,13 @@
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   Returns the numerical position of the last occurrence of
-   <parameter>needle</parameter>. Also note that string positions start at 0,
-   and not 1.
+   Returns the position where the needle exists relative to the beginnning of
+   the <parameter>haystack</parameter> string (independent of search direction
+   or offset).
+   Also note that string positions start at 0, and not 1.
   </para>
   <para>
-   If <parameter>needle</parameter> is not found, &false; is returned.
+   Returns &false; if the needle was not found.
   </para>
   &return.falseproblem;
  </refsect1>

Modified: phpdoc/en/trunk/reference/strings/functions/strrpos.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/strrpos.xml	2011-12-25 00:52:26 UTC \
                (rev 321382)
+++ phpdoc/en/trunk/reference/strings/functions/strrpos.xml	2011-12-25 02:27:36 UTC \
(rev 321383) @@ -15,9 +15,8 @@
    <methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
  </methodsynopsis>
   <para>
-   Returns the numeric position of the last occurrence of
-   <parameter>needle</parameter> in the <parameter>haystack</parameter>
-   string.
+   Find the numeric position of the last occurrence of
+   <parameter>needle</parameter> in the <parameter>haystack</parameter> string.
   </para>
  </refsect1>

@@ -46,9 +45,9 @@
      <term><parameter>offset</parameter></term>
      <listitem>
       <para>
-       If specified, search will stop this number of characters counted from the
+       If specified, search will start this number of characters counted from the
        beginning of the string. If the value is negative, search will instead start
-       from that many characters from the end of the string.
+       from that many characters from the end of the string, searching backwards.
       </para>
      </listitem>
     </varlistentry>
@@ -59,9 +58,15 @@
  <refsect1 role="returnvalues">
   &reftitle.returnvalues;
   <para>
-   Returns the position where the needle exists. Returns &false; if the needle
-   was not found.
+   Returns the position where the needle exists relative to the beginnning of
+   the <parameter>haystack</parameter> string (independent of search direction
+   or offset).
+   Also note that string positions start at 0, and not 1.
   </para>
+  <para>
+   Returns &false; if the needle was not found.
+  </para>
+  &return.falseproblem;
  </refsect1>

  <refsect1 role="changelog">

Modified: phpdoc/en/trunk/reference/strings/functions/strstr.xml
===================================================================
--- phpdoc/en/trunk/reference/strings/functions/strstr.xml	2011-12-25 00:52:26 UTC \
                (rev 321382)
+++ phpdoc/en/trunk/reference/strings/functions/strstr.xml	2011-12-25 02:27:36 UTC \
(rev 321383) @@ -3,7 +3,7 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strstr">
  <refnamediv>
   <refname>strstr</refname>
-  <refpurpose>Find first occurrence of a string</refpurpose>
+  <refpurpose>Find the first occurrence of a string</refpurpose>
  </refnamediv>

  <refsect1 role="description">



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic