Fix for #12957 reported by even@cycleburner.org and some whitespace.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55940 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2001-08-25 21:08:41 +00:00
parent 455a83ea33
commit 920f57cd8a

View file

@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
<!-- $Revision: 1.104 $ -->
<!-- $Revision: 1.105 $ -->
<reference id="ref.strings">
<title>String functions</title>
<titleabbrev>Strings</titleabbrev>
@ -1357,13 +1357,13 @@ echo "&lt;/PRE&gt;\n";
<listitem>
<simpara>
"\n" (<acronym>ASCII</acronym> <literal>13</literal>
(<literal>0x0D</literal>)), a newline.
(<literal>0x0A</literal>)), a new line.(new line NL)
</simpara>
</listitem>
<listitem>
<simpara>
"\r" (<acronym>ASCII</acronym> <literal>10</literal>
(<literal>0x0A</literal>)), a return.
(<literal>0x0D</literal>)), a carriage return.
</simpara>
</listitem>
<listitem>
@ -1375,7 +1375,7 @@ echo "&lt;/PRE&gt;\n";
<listitem>
<simpara> <!-- not \v, since not supported by PHP -->
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
(<literal>0x0B</literal>)), a <!-- TODO: -->.
(<literal>0x0B</literal>)), a vertical tab.
</simpara>
</listitem>
</itemizedlist>
@ -1733,13 +1733,13 @@ echo $second[1]; /* prints "another" */
<listitem>
<simpara>
"\n" (<acronym>ASCII</acronym> <literal>13</literal>
(<literal>0x0D</literal>)), a newline.
(<literal>0x0A</literal>)), a new line (line feed).
</simpara>
</listitem>
<listitem>
<simpara>
"\r" (<acronym>ASCII</acronym> <literal>10</literal>
(<literal>0x0A</literal>)), a return.
(<literal>0x0D</literal>)), a carriage return.
</simpara>
</listitem>
<listitem>
@ -1751,7 +1751,7 @@ echo $second[1]; /* prints "another" */
<listitem>
<simpara> <!-- not \v, since not supported by PHP -->
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
(<literal>0x0B</literal>)), a <!-- TODO: -->.
(<literal>0x0B</literal>)), a vertical tab.
</simpara>
</listitem>
</itemizedlist>
@ -1812,36 +1812,38 @@ $clean = rtrim($binary,"\0x00..\0x1F");
</funcprototype>
</funcsynopsis>
<para>
The function <function>sscanf</function> is the input analog of
<function>printf</function>. <function>sscanf</function> reads from
the string <parameter>str</parameter> and interprets it according to
the specified <parameter>format</parameter>. If only two parameters were
passed to this function, the values parsed will be returned as an array.
<example>
<title><function>sscanf</function> Example</title>
<programlisting role="php">
The function <function>sscanf</function> is the input analog of
<function>printf</function>. <function>sscanf</function> reads
from the string <parameter>str</parameter> and interprets it
according to the specified <parameter>format</parameter>. If only
two parameters were passed to this function, the values parsed
will be returned as an array.
<example>
<title><function>sscanf</function> Example</title>
<programlisting role="php">
// getting the serial number
$serial = sscanf("SN/2350001","SN/%d");
// and the date of manufacturing
$mandate = "January 01 2000";
list($month, $day, $year) = sscanf($mandate,"%s %d %d");
echo "Item $serial was manufactured on: $year-".substr($month,0,3)."-$day\n";
</programlisting>
</example>
If optional parameters are passed, the function will return the number of
assigned values. The optional parameters must be passed by reference.
<example>
<title><function>sscanf</function> - using optional parameters</title>
<programlisting role="php">
</programlisting>
</example>
If optional parameters are passed, the function will return the
number of assigned values. The optional parameters must be passed
by reference.
<example>
<title><function>sscanf</function> - using optional parameters</title>
<programlisting role="php">
// get author info and generate DocBook entry
$auth = "24\tLewis Carroll";
$n = sscanf($auth,"%d\t%s %s", &amp;$id, &amp;$first, &amp;$last);
echo "&lt;author id='$id'&gt;
&lt;firstname&gt;$first&lt;/firstname&gt;
&lt;surname&gt;$last&lt;/surname&gt;
&lt;firstname&gt;$first&lt;/firstname&gt;
&lt;surname&gt;$last&lt;/surname&gt;
&lt;/author&gt;\n";
</programlisting>
</example>
</programlisting>
</example>
</para>
<para>
See also: <function>fscanf</function>, <function>printf</function>,
@ -3590,13 +3592,13 @@ echo substr_replace($var, '', 10, -1) . "&lt;br&gt;\n";
<listitem>
<simpara>
"\n" (<acronym>ASCII</acronym> <literal>13</literal>
(<literal>0x0D</literal>)), a newline.
(<literal>0x0A</literal>)), a new line (line feed).
</simpara>
</listitem>
<listitem>
<simpara>
"\r" (<acronym>ASCII</acronym> <literal>10</literal>
(<literal>0x0A</literal>)), a return.
(<literal>0x0D</literal>)), a carriage return.
</simpara>
</listitem>
<listitem>
@ -3608,7 +3610,7 @@ echo substr_replace($var, '', 10, -1) . "&lt;br&gt;\n";
<listitem>
<simpara> <!-- not \v, since not supported by PHP -->
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
(<literal>0x0B</literal>)), a <!-- TODO: -->.
(<literal>0x0B</literal>)), a vertical tab.
</simpara>
</listitem>
</itemizedlist>