Added some more text to explain the strspn example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@44295 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jesus M. Castagnetto 2001-03-26 03:44:44 +00:00
parent 11d855622d
commit 918f46348b

View file

@ -2775,15 +2775,15 @@ if (is_string ($pos) && !$pos) {
<parameter>str1</parameter> which consists entirely of characters
in <parameter>str2</parameter>.
</simpara>
<para>
<para>
The line of code:
<informalexample>
<programlisting role="php">
strspn ("42 is the answer, what is the question ...", "1234567890");
$var = strspn ("42 is the answer, what is the question ...", "1234567890");
</programlisting>
<para>
will return 2 as result.
</para>
</informalexample>
will assign 2 to <varname>$var</varname>, because the string "42" will
be the longest segment containing characters from "1234567890".
</para>
<simpara>
See also <function>strcspn</function>.