david Tue Sep 2 17:11:54 2003 EDT
Modified files:
/phpdoc/en/reference/strings/functions stripos.xml strrchr.xml
strripos.xml strrpos.xml
Log:
clarify and correct where needle can be a string and where a char
Index: phpdoc/en/reference/strings/functions/stripos.xml
diff -u phpdoc/en/reference/strings/functions/stripos.xml:1.2
phpdoc/en/reference/strings/functions/stripos.xml:1.3
--- phpdoc/en/reference/strings/functions/stripos.xml:1.2 Thu Feb 20 05:16:50
2003
+++ phpdoc/en/reference/strings/functions/stripos.xml Tue Sep 2 17:11:54 2003
@@ -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 @@
<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>
Index: phpdoc/en/reference/strings/functions/strrchr.xml
diff -u phpdoc/en/reference/strings/functions/strrchr.xml:1.3
phpdoc/en/reference/strings/functions/strrchr.xml:1.4
--- phpdoc/en/reference/strings/functions/strrchr.xml:1.3 Fri May 30 12:47:59
2003
+++ phpdoc/en/reference/strings/functions/strrchr.xml Tue Sep 2 17:11:54 2003
@@ -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
Index: phpdoc/en/reference/strings/functions/strripos.xml
diff -u phpdoc/en/reference/strings/functions/strripos.xml:1.2
phpdoc/en/reference/strings/functions/strripos.xml:1.3
--- phpdoc/en/reference/strings/functions/strripos.xml:1.2 Wed May 28 08:00:30
2003
+++ phpdoc/en/reference/strings/functions/strripos.xml Tue Sep 2 17:11:54 2003
@@ -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>
@@ -23,6 +23,10 @@
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 @@
<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>
Index: phpdoc/en/reference/strings/functions/strrpos.xml
diff -u phpdoc/en/reference/strings/functions/strrpos.xml:1.5
phpdoc/en/reference/strings/functions/strrpos.xml:1.6
--- phpdoc/en/reference/strings/functions/strrpos.xml:1.5 Wed Jul 16 13:22:01
2003
+++ phpdoc/en/reference/strings/functions/strrpos.xml Tue Sep 2 17:11:54 2003
@@ -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>
@@ -54,6 +54,10 @@
<para>
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>,