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
This commit is contained in:
David Croft 2003-09-02 21:11:54 +00:00
parent 7db572ab4d
commit 4af7e338ac
4 changed files with 26 additions and 16 deletions

View file

@ -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>

View file

@ -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

View file

@ -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>

View file

@ -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>,