nlopess Tue Jul 6 08:32:39 2004 EDT
Modified files:
/phpdoc/en/reference/strings/functions strpbrk.xml
Log:
adding documentation and examples for strpbrk
http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/strpbrk.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/strings/functions/strpbrk.xml
diff -u phpdoc/en/reference/strings/functions/strpbrk.xml:1.1
phpdoc/en/reference/strings/functions/strpbrk.xml:1.2
--- phpdoc/en/reference/strings/functions/strpbrk.xml:1.1 Mon May 17 11:35:23
2004
+++ phpdoc/en/reference/strings/functions/strpbrk.xml Tue Jul 6 08:32:39 2004
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.strpbrk">
<refnamediv>
<refname>strpbrk</refname>
@@ -10,13 +10,39 @@
<refsect1>
<title>Description</title>
<methodsynopsis>
- <type>array</type><methodname>strpbrk</methodname>
+ <type>string</type><methodname>strpbrk</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>string</type><parameter>char_list</parameter></methodparam>
</methodsynopsis>
+ <para>
+ <function>strpbrk</function> searches the <parameter>haystack</parameter>
+ string for a <parameter>char_list</parameter>, and returns a string
+ starting from the character found (or &false; if it is not found).
+ </para>
+ <note>
+ <para>
+ The <parameter>char_list</parameter> parameter is case sensitive.
+ </para>
+ </note>
+ <para>
+ <example>
+ <title><function>strpbrk</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
- &warn.undocumented.func;
+$text = 'This is a Simple text.';
+// this echoes "is is a Simple text." because 'i' is matched first
+echo strpbrk($text, 'mi');
+
+// this echoes "Simple text." because chars are case sensitive
+echo strpbrk($text, 'S');
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</refsect1>
</refentry>