From 4af7e338ac7267d6795b184a8c3de7e19bee988f Mon Sep 17 00:00:00 2001
From: David Croft <david@php.net>
Date: Tue, 2 Sep 2003 21:11:54 +0000
Subject: [PATCH] clarify and correct where needle can be a string and where a
 char

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@139491 c90b9560-bf6c-de11-be94-00142212c4b1
---
 reference/strings/functions/stripos.xml  | 17 +++++++++--------
 reference/strings/functions/strrchr.xml  |  7 ++++---
 reference/strings/functions/strripos.xml |  8 ++++++--
 reference/strings/functions/strrpos.xml  | 10 +++++++---
 4 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/reference/strings/functions/stripos.xml b/reference/strings/functions/stripos.xml
index 3c93bcc15c..7f584657c9 100755
--- a/reference/strings/functions/stripos.xml
+++ b/reference/strings/functions/stripos.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
   <refentry id="function.stripos">
    <refnamediv>
     <refname>stripos</refname>
@@ -19,14 +19,15 @@
      Returns the numeric position of the first occurrence of
      <parameter>needle</parameter> in the <parameter>haystack</parameter>
      <type>string</type>.  Unlike <function> strpos</function>, 
-     <function>stripos</function> is case-insensitive.  And unlike 
-     <function>strrpos</function>, this function can take a full string as 
-     the <parameter>needle</parameter> parameter and the entire string will 
-     be used.
+     <function>stripos</function> is case-insensitive.
+    </para>
+    <para>
+     Note that the <parameter>needle</parameter> may be a string of one or
+     more characters.
     </para>
     <para>
      If <parameter>needle</parameter> is not found,
-     <function>strpos</function> will return <type>boolean</type> &false;.
+     <function>stripos</function> will return <type>boolean</type> &false;.
     </para>
 
     &return.falseproblem;
@@ -72,8 +73,8 @@ if ($pos2 !== false) {
     <para>
      See also <function>strpos</function>, <function>strrpos</function>,
      <function>strrchr</function>, <function>substr</function>,
-     <function>stristr</function>, <function>strstr</function> and
-     <function>stri_replace</function>.
+     <function>stristr</function>, <function>strstr</function>,
+     <function>strripos</function> and <function>stri_replace</function>.
     </para>
    </refsect1>
   </refentry>
diff --git a/reference/strings/functions/strrchr.xml b/reference/strings/functions/strrchr.xml
index 33f5453e76..e7789e593b 100644
--- a/reference/strings/functions/strrchr.xml
+++ b/reference/strings/functions/strrchr.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
   <refentry id="function.strrchr">
    <refnamediv>
@@ -13,7 +13,7 @@
      <methodsynopsis>
       <type>string</type><methodname>strrchr</methodname>
       <methodparam><type>string</type><parameter>haystack</parameter></methodparam>
-      <methodparam><type>string</type><parameter>needle</parameter></methodparam>
+      <methodparam><type>char</type><parameter>needle</parameter></methodparam>
      </methodsynopsis>
     <para>
      This function returns the portion of
@@ -26,7 +26,8 @@
     </para>
     <para>
      If <parameter>needle</parameter> contains more than one
-     character, the first is used.
+     character, only the first is used. This behavior is different from that
+     of <function>strchr</function>.
     </para>
     <para>
      If <parameter>needle</parameter> is not a string, it is converted
diff --git a/reference/strings/functions/strripos.xml b/reference/strings/functions/strripos.xml
index 7d89d4f25b..755033b9da 100644
--- a/reference/strings/functions/strripos.xml
+++ b/reference/strings/functions/strripos.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
   <refentry id="function.strripos">
    <refnamediv>
     <refname>strripos</refname>
@@ -22,6 +22,10 @@
      case-insensitive.  Also note that string positions start at 0, and not
      1. 
     </para>
+    <para>
+     Note that the <parameter>needle</parameter> may be a string of one or
+     more characters.
+    </para>
     <para>
      If <parameter>needle</parameter> is not found, &false; is returned.
     </para>
@@ -60,7 +64,7 @@ if ($pos === false) {
     <para>
      See also <function>strrpos</function>,
      <function>strrchr</function>, 
-     <function>substr</function>, and 
+     <function>substr</function>, <function>stripos</function> and 
      <function>stristr</function>.
     </para>
    </refsect1>
diff --git a/reference/strings/functions/strrpos.xml b/reference/strings/functions/strrpos.xml
index 4689dd8540..b9d998b8d6 100644
--- a/reference/strings/functions/strrpos.xml
+++ b/reference/strings/functions/strrpos.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <!-- splitted from ./en/functions/strings.xml, last change in rev 1.8 -->
   <refentry id="function.strrpos">
    <refnamediv>
@@ -13,13 +13,13 @@
      <methodsynopsis>
       <type>int</type><methodname>strrpos</methodname>
       <methodparam><type>string</type><parameter>haystack</parameter></methodparam>
-      <methodparam><type>char</type><parameter>needle</parameter></methodparam>
+      <methodparam><type>string</type><parameter>needle</parameter></methodparam>
      </methodsynopsis>
     <para>
      Returns the numeric position of the last occurrence of
      <parameter>needle</parameter> in the
      <parameter>haystack</parameter> string.  Note that the needle in
-     this case can only be a single character.  If a string is passed
+     this case can only be a single character in PHP 4.  If a string is passed
      as the needle, then only the first character of that string will
      be used.
     </para>
@@ -55,6 +55,10 @@ if (is_string($pos) && !$pos) {
      If <parameter>needle</parameter> is not a string, it is converted
      to an integer and applied as the ordinal value of a character.
     </para>
+    <para>
+     The <parameter>needle</parameter> may be a string of more than one
+     character as of PHP 5.
+    </para>
     <para>
      See also <function>strpos</function>,
      <function>strripos</function>,