vrana Wed Jun 16 04:30:22 2004 EDT
Modified files:
/phpdoc/en/reference/strings/functions strcspn.xml strspn.xml
Log:
binary safety
start and length optional parameters
http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/strcspn.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/strings/functions/strcspn.xml
diff -u phpdoc/en/reference/strings/functions/strcspn.xml:1.2
phpdoc/en/reference/strings/functions/strcspn.xml:1.3
--- phpdoc/en/reference/strings/functions/strcspn.xml:1.2 Wed Apr 17 02:44:22
2002
+++ phpdoc/en/reference/strings/functions/strcspn.xml Wed Jun 16 04:30:20 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strcspn">
<refnamediv>
@@ -14,11 +14,19 @@
<type>int</type><methodname>strcspn</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>start</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<simpara>
Returns the length of the initial segment of
<parameter>str1</parameter> which does <emphasis>not</emphasis>
contain any of the characters in <parameter>str2</parameter>.
+ </simpara>
+ <simpara>
+ As of PHP 4.0B1 this function is binary safe.
+ Additionally it accepts two optional integer
+ parameters that can be used to define the starting position
+ and the length of the string to examine.
</simpara>
<simpara>
See also <function>strspn</function>.
http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/strspn.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/strings/functions/strspn.xml
diff -u phpdoc/en/reference/strings/functions/strspn.xml:1.3
phpdoc/en/reference/strings/functions/strspn.xml:1.4
--- phpdoc/en/reference/strings/functions/strspn.xml:1.3 Fri May 30 12:47:59
2003
+++ phpdoc/en/reference/strings/functions/strspn.xml Wed Jun 16 04:30:20 2004
@@ -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.strspn">
<refnamediv>
@@ -14,6 +14,8 @@
<type>int</type><methodname>strspn</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>start</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>length</parameter></methodparam>
</methodsynopsis>
<simpara>
Returns the length of the initial segment of
@@ -33,6 +35,21 @@
</informalexample>
will assign 2 to <varname>$var</varname>, because the string "42" will
be the longest segment containing characters from "1234567890".
+ </para>
+ <para>
+ As of PHP 4.0B1 this function is binary safe.
+ Additionally it accepts two optional integer
+ parameters that can be used to define the starting position
+ and the length of the string to examine.
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo strspn("foo", "o", 1, 2); // 2
+?>
+]]>
+ </programlisting>
+ </informalexample>
</para>
<simpara>
See also <function>strcspn</function>.