Date: 05/31/98
- Next message: rasmus: "[PHP-DEV] CVS update: php3/functions"
- Previous message: rasmus: "[PHP-DEV] CVS update: php3"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sunday May 31, 1998 @ 17:46
Author: rasmus
Update of /repository/php3/doc/functions
In directory asf:/tmp/cvs-serv260/doc/functions
Modified Files:
strings.sgml
Log Message:
Add strrpos() function to complement strpos function added in RC5.
Index: php3/doc/functions/strings.sgml
diff -c php3/doc/functions/strings.sgml:1.26 php3/doc/functions/strings.sgml:1.27
*** php3/doc/functions/strings.sgml:1.26 Sun May 31 17:16:56 1998
--- php3/doc/functions/strings.sgml Sun May 31 17:46:27 1998
***************
*** 771,776 ****
--- 771,809 ----
</refsect1>
</refentry>
+ <refentry id="function.strrpos">
+ <refnamediv>
+ <refname>strrpos</refname>
+ <refpurpose>Find position of last occurrence of a char in a string.</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcdef>string <function>strrpos</function></funcdef>
+ <paramdef>string <parameter>haystack</parameter></paramdef>
+ <paramdef>char <parameter>needle</parameter></paramdef>
+ </funcsynopsis>
+
+ <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 as the needle, then only the first
+ character of that string will be used.
+
+ <para>
+ If <parameter>needle</parameter> is not found, returns false.
+
+ <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>
+ See also <function>strpos</function>, <function>strrchr</function>,
+ <function>substr</function>, and <function>strstr</function>.
+
+ </refsect1>
+ </refentry>
+
<refentry id="function.strpos">
<refnamediv>
<refname>strpos</refname>
***************
*** 786,792 ****
<para>
Returns the numeric position of the first occurrence of <parameter>needle</parameter>
! in the <parameter>haystack</parameter> string.
<para>
If <parameter>needle</parameter> is not found, returns false.
--- 819,827 ----
<para>
Returns the numeric position of the first occurrence of <parameter>needle</parameter>
! in the <parameter>haystack</parameter> string. Unlike the <function>strrpos</function>,
! this function can take a full string as the <parameter>needle</parameter> parameter and
! the entire string will be used.
<para>
If <parameter>needle</parameter> is not found, returns false.
***************
*** 796,802 ****
an integer and applied as the ordinal value of a character.
<para>
! See also <function>strrchr</function>,
<function>substr</function>, and <function>strstr</function>.
</refsect1>
--- 831,837 ----
an integer and applied as the ordinal value of a character.
<para>
! See also <function>strrpos</function>, <function>strrchr</function>,
<function>substr</function>, and <function>strstr</function>.
</refsect1>
- Next message: rasmus: "[PHP-DEV] CVS update: php3/functions"
- Previous message: rasmus: "[PHP-DEV] CVS update: php3"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

