mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Generate some string methodsynopses based on stubs
Partial merge of https://github.com/php/doc-en/pull/265. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351904 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6d8125aa1d
commit
e095023e40
71 changed files with 764 additions and 520 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.addcslashes">
|
||||
<refentry xml:id="function.addcslashes" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>addcslashes</refname>
|
||||
<refpurpose>Quote string with slashes in a C style</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>addcslashes</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>charlist</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>characters</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string with backslashes before characters that are
|
||||
listed in <parameter>charlist</parameter> parameter.
|
||||
listed in <parameter>characters</parameter> parameter.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to be escaped.
|
||||
|
@ -32,11 +32,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>charlist</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A list of characters to be escaped. If
|
||||
<parameter>charlist</parameter> contains characters
|
||||
<parameter>characters</parameter> contains characters
|
||||
<literal>\n</literal>, <literal>\r</literal> etc., they are
|
||||
converted in C-like style, while other non-alphanumeric characters
|
||||
with ASCII codes lower than 32 and higher than 126 converted to
|
||||
|
@ -81,7 +81,7 @@ echo addcslashes("zoo['.']", 'z..A');
|
|||
also defined in other C-derived languages, including PHP, meaning that
|
||||
you may not get the desired result if you use the output of
|
||||
<function>addcslashes</function> to generate code in those languages
|
||||
with these characters defined in <parameter>charlist</parameter>.
|
||||
with these characters defined in <parameter>characters</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -99,7 +99,7 @@ echo addcslashes("zoo['.']", 'z..A');
|
|||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<parameter>charlist</parameter> like "\0..\37", which would
|
||||
<parameter>characters</parameter> like "\0..\37", which would
|
||||
escape all characters with ASCII code between 0 and 31.
|
||||
<example>
|
||||
<title><function>addcslashes</function> example</title>
|
||||
|
@ -128,7 +128,6 @@ $escaped = addcslashes($not_escaped, "\0..\37!@\177..\377");
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.addslashes">
|
||||
<refentry xml:id="function.addslashes" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>addslashes</refname>
|
||||
<refpurpose>Quote string with slashes</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>addslashes</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string with backslashes added before characters that need to be
|
||||
|
@ -57,7 +57,7 @@ eval("echo '" . addslashes($str) . "';");
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to be escaped.
|
||||
|
@ -109,7 +109,6 @@ echo addslashes($str);
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>bin2hex</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an ASCII string containing the hexadecimal representation
|
||||
of <parameter>str</parameter>. The conversion is done byte-wise
|
||||
of <parameter>string</parameter>. The conversion is done byte-wise
|
||||
with the high-nibble first.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A string.
|
||||
|
@ -53,7 +53,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>chr</methodname>
|
||||
<methodparam><type>int</type><parameter>bytevalue</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>codepoint</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a one-character string containing the character specified
|
||||
by interpreting <parameter>bytevalue</parameter> as an unsigned integer.
|
||||
by interpreting <parameter>codepoint</parameter> as an unsigned integer.
|
||||
</para>
|
||||
<para>
|
||||
This can be used to create a one-character string in a single-byte encoding such as ASCII, ISO-8859, or Windows 1252, by passing the position of a desired character in the encoding's mapping table. However, note that this function is not aware of any string encoding, and in particular cannot be passed a Unicode code point value to generate a string in a multibyte encoding like UTF-8 or UTF-16.
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>bytevalue</parameter></term>
|
||||
<term><parameter>codepoint</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An integer between 0 and 255.
|
||||
|
@ -73,7 +73,7 @@ $bytevalue %= 256;
|
|||
<row>
|
||||
<entry>7.4.0</entry>
|
||||
<entry>
|
||||
The function no longer silently accepts unsupported <parameter>bytevalue</parameter>s,
|
||||
The function no longer silently accepts unsupported <parameter>codepoint</parameter>s,
|
||||
and casts these to <literal>0</literal>.
|
||||
</entry>
|
||||
</row>
|
||||
|
@ -151,7 +151,6 @@ echo $str;
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,15 +10,15 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>chunk_split</methodname>
|
||||
<methodparam><type>string</type><parameter>body</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>chunklen</parameter><initializer>76</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>end</parameter><initializer>"\r\n"</initializer></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>76</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>"\r\n"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Can be used to split a string into smaller chunks which is useful for
|
||||
e.g. converting <function>base64_encode</function> output to match RFC
|
||||
2045 semantics. It inserts <parameter>end</parameter> every
|
||||
<parameter>chunklen</parameter> characters.
|
||||
2045 semantics. It inserts <parameter>separator</parameter> every
|
||||
<parameter>length</parameter> characters.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>body</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to be chunked.
|
||||
|
@ -35,7 +35,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>chunklen</parameter></term>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The chunk length.
|
||||
|
@ -43,7 +43,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>end</parameter></term>
|
||||
<term><parameter>separator</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The line ending sequence.
|
||||
|
@ -92,7 +92,6 @@ $new_string = chunk_split(base64_encode($data));
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.convert-uudecode">
|
||||
<refentry xml:id="function.convert-uudecode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>convert_uudecode</refname>
|
||||
<refpurpose>Decode a uuencoded string</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>convert_uudecode</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>convert_uudecode</function> decodes a uuencoded string.
|
||||
|
@ -28,7 +28,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The uuencoded data.
|
||||
|
@ -78,7 +78,6 @@ I love PHP!
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.convert-uuencode">
|
||||
<refentry xml:id="function.convert-uuencode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>convert_uuencode</refname>
|
||||
<refpurpose>Uuencode a string</refpurpose>
|
||||
|
@ -9,8 +9,8 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>convert_uuencode</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<type>string</type><methodname>convert_uuencode</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>convert_uuencode</function> encodes a string using the uuencode
|
||||
|
@ -34,7 +34,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data to be encoded.
|
||||
|
@ -48,10 +48,33 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the uuencoded data &return.falseforfailure;.
|
||||
Returns the uuencoded data.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Prior to this version, trying to convert an empty string returned &false;
|
||||
for no particular reason.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -88,7 +111,6 @@ echo convert_uuencode($some_string);
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.count-chars">
|
||||
<refentry xml:id="function.count-chars" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>count_chars</refname>
|
||||
<refpurpose>Return information about characters used in a string</refpurpose>
|
||||
|
@ -9,7 +9,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>count_chars</methodname>
|
||||
<type class="union"><type>array</type><type>string</type></type><methodname>count_chars</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
|
@ -81,6 +81,28 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Prior to this version, the function returned &false; on failure.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -128,7 +150,6 @@ There were 1 instance(s) of "w" in the string.
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>crc32</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Generates the cyclic redundancy checksum polynomial of 32-bit
|
||||
lengths of the <parameter>str</parameter>. This is usually used
|
||||
lengths of the <parameter>string</parameter>. This is usually used
|
||||
to validate the integrity of data being transmitted.
|
||||
</para>
|
||||
<warning>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data.
|
||||
|
@ -76,7 +76,7 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the crc32 checksum of <parameter>str</parameter> as an integer.
|
||||
Returns the crc32 checksum of <parameter>string</parameter> as an integer.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -113,7 +113,6 @@ printf("%u\n", $checksum);
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.explode">
|
||||
<refentry xml:id="function.explode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>explode</refname>
|
||||
<refpurpose>Split a string by a string</refpurpose>
|
||||
|
@ -10,14 +10,14 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>explode</methodname>
|
||||
<methodparam><type>string</type><parameter>delimiter</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>separator</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer>PHP_INT_MAX</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>limit</parameter><initializer><constant>PHP_INT_MAX</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an array of strings, each of which is a substring of
|
||||
<parameter>string</parameter> formed by splitting it on
|
||||
boundaries formed by the string <parameter>delimiter</parameter>.
|
||||
boundaries formed by the string <parameter>separator</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>delimiter</parameter></term>
|
||||
<term><parameter>separator</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The boundary string.
|
||||
|
@ -65,7 +65,7 @@
|
|||
Although <function>implode</function> can, for historical reasons,
|
||||
accept its parameters in either order,
|
||||
<function>explode</function> cannot. You must ensure that the
|
||||
<parameter>delimiter</parameter> argument comes before the
|
||||
<parameter>separator</parameter> argument comes before the
|
||||
<parameter>string</parameter> argument.
|
||||
</para>
|
||||
</note>
|
||||
|
@ -76,12 +76,12 @@
|
|||
<para>
|
||||
Returns an <type>array</type> of <type>string</type>s
|
||||
created by splitting the <parameter>string</parameter> parameter on
|
||||
boundaries formed by the <parameter>delimiter</parameter>.
|
||||
boundaries formed by the <parameter>separator</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>delimiter</parameter> is an empty <type>string</type> (""),
|
||||
If <parameter>separator</parameter> is an empty <type>string</type> (""),
|
||||
<function>explode</function> will return &false;.
|
||||
If <parameter>delimiter</parameter> contains a value that is not
|
||||
If <parameter>separator</parameter> contains a value that is not
|
||||
contained in <parameter>string</parameter> and a negative
|
||||
<parameter>limit</parameter> is used, then an empty <type>array</type> will be
|
||||
returned, otherwise an <type>array</type> containing
|
||||
|
@ -211,7 +211,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fprintf">
|
||||
<refentry xml:id="function.fprintf" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>fprintf</refname>
|
||||
<refpurpose>Write a formatted string to a stream</refpurpose>
|
||||
|
@ -10,13 +10,13 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>fprintf</methodname>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>format</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>mixed</type><parameter>values</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Write a string produced according to <parameter>format</parameter> to the
|
||||
stream resource specified by <parameter>handle</parameter>.
|
||||
stream resource specified by <parameter>stream</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<term><parameter>stream</parameter></term>
|
||||
<listitem>
|
||||
&fs.file.pointer;
|
||||
</listitem>
|
||||
|
@ -110,7 +110,6 @@ echo "wrote $len bytes to currency.txt";
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.get-html-translation-table">
|
||||
<refentry xml:id="function.get-html-translation-table" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>get_html_translation_table</refname>
|
||||
<refpurpose>Returns the translation table used by <function>htmlspecialchars</function> and <function>htmlentities</function></refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>get_html_translation_table</methodname>
|
||||
<methodparam choice="opt"><type>int</type><parameter>table</parameter><initializer>HTML_SPECIALCHARS</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>table</parameter><initializer><constant>HTML_SPECIALCHARS</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>ENT_COMPAT</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>"UTF-8"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -172,7 +172,6 @@ array(1510) {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.hebrev">
|
||||
<refentry xml:id="function.hebrev" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>hebrev</refname>
|
||||
<refpurpose>Convert logical Hebrew text to visual text</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>hebrev</methodname>
|
||||
<methodparam><type>string</type><parameter>hebrew_text</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>max_chars_per_line</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>hebrew_text</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A Hebrew input string.
|
||||
|
@ -63,7 +63,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<refentry xml:id="function.hex2bin" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.hex2bin">
|
||||
<refnamediv>
|
||||
<refname>hex2bin</refname>
|
||||
<refpurpose>Decodes a hexadecimally encoded binary string</refpurpose>
|
||||
|
@ -11,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>hex2bin</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Decodes a hexadecimally encoded binary string.
|
||||
|
@ -28,7 +27,7 @@
|
|||
&reftitle.parameters;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Hexadecimal representation of data.
|
||||
|
@ -85,7 +84,6 @@ string(16) "example hex data"
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.html-entity-decode">
|
||||
<refentry xml:id="function.html-entity-decode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>html_entity_decode</refname>
|
||||
<refpurpose>Convert HTML entities to their corresponding characters</refpurpose>
|
||||
|
@ -11,8 +11,8 @@
|
|||
<methodsynopsis>
|
||||
<type>string</type><methodname>html_entity_decode</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>ini_get("default_charset")</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>ENT_COMPAT</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>html_entity_decode</function> is the opposite of
|
||||
|
@ -117,6 +117,28 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>encoding</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -167,7 +189,6 @@ echo $b; // I'll "walk" the <b>dog</b> now
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.htmlentities" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refentry xml:id="function.htmlentities" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>htmlentities</refname>
|
||||
<refpurpose>Convert all applicable characters to HTML entities</refpurpose>
|
||||
|
@ -11,8 +11,8 @@
|
|||
<methodsynopsis>
|
||||
<type>string</type><methodname>htmlentities</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>ini_get("default_charset")</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>ENT_COMPAT</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>double_encode</parameter><initializer>&true;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -155,6 +155,28 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>encoding</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -210,7 +232,6 @@ echo htmlentities($str, ENT_QUOTES | ENT_IGNORE, "UTF-8");
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.htmlspecialchars-decode">
|
||||
<refentry xml:id="function.htmlspecialchars-decode" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>htmlspecialchars_decode</refname>
|
||||
<refpurpose>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<methodsynopsis>
|
||||
<type>string</type><methodname>htmlspecialchars_decode</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>ENT_COMPAT</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
|
@ -147,7 +147,6 @@ echo htmlspecialchars_decode($str, ENT_NOQUOTES);
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.htmlspecialchars" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refentry xml:id="function.htmlspecialchars" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>htmlspecialchars</refname>
|
||||
<refpurpose>Convert special characters to HTML entities</refpurpose>
|
||||
|
@ -11,8 +11,8 @@
|
|||
<methodsynopsis>
|
||||
<type>string</type><methodname>htmlspecialchars</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>ENT_COMPAT | ENT_HTML401</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>ini_get("default_charset")</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>ENT_COMPAT</constant></initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>double_encode</parameter><initializer>&true;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<entry><literal>&quot;</literal>, unless <constant>ENT_NOQUOTES</constant> is set</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>'</literal> (single quote)</entry>
|
||||
<entry><literal>'</literal> (single quote)</entry>
|
||||
<entry>
|
||||
<literal>&#039;</literal> (for <constant>ENT_HTML401</constant>) or <literal>&apos;</literal> (for
|
||||
<constant>ENT_XML1</constant>, <constant>ENT_XHTML</constant> or
|
||||
|
@ -300,7 +300,6 @@ echo $new; // <a href='test'>Test</a>
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.lcfirst">
|
||||
<refentry xml:id="function.lcfirst" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>lcfirst</refname>
|
||||
<refpurpose>Make a string's first character lowercase</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>lcfirst</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string with the first character of
|
||||
<parameter>str</parameter> lowercased if that character is
|
||||
<parameter>string</parameter> lowercased if that character is
|
||||
alphabetic.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -81,7 +81,6 @@ $bar = lcfirst(strtoupper($bar)); // hELLO WORLD!
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ltrim">
|
||||
<refentry xml:id="function.ltrim" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>ltrim</refname>
|
||||
<refpurpose>Strip whitespace (or other characters) from the beginning of a string</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ltrim</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>character_mask</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\0"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Strip whitespace (or other characters) from the beginning of a string.
|
||||
|
@ -23,7 +23,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -31,11 +31,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>character_mask</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You can also specify the characters you want to strip, by means of the
|
||||
<parameter>character_mask</parameter> parameter.
|
||||
<parameter>characters</parameter> parameter.
|
||||
Simply list all characters that you want to be stripped. With
|
||||
<literal>..</literal> you can specify a range of characters.
|
||||
</para>
|
||||
|
@ -49,7 +49,7 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This function returns a string with whitespace stripped from the
|
||||
beginning of <parameter>str</parameter>.
|
||||
beginning of <parameter>string</parameter>.
|
||||
Without the second parameter,
|
||||
<function>ltrim</function> will strip these characters:
|
||||
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
|
||||
|
@ -158,7 +158,6 @@ string(15) "Example string
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>md5_file</methodname>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>md5_file</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates the MD5 hash of the file specified by the
|
||||
|
@ -35,7 +35,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>raw_output</parameter></term>
|
||||
<term><parameter>binary</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When &true;, returns the digest in raw binary format with a length of
|
||||
|
@ -83,7 +83,6 @@ echo 'MD5 file hash of ' . $file . ': ' . md5_file($file);
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>md5</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates the MD5 hash of <parameter>str</parameter> using the
|
||||
Calculates the MD5 hash of <parameter>string</parameter> using the
|
||||
<link xlink:href="&url.rfc;1321">RSA Data Security, Inc.
|
||||
MD5 Message-Digest Algorithm</link>, and returns that hash.
|
||||
</para>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string.
|
||||
|
@ -37,10 +37,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>raw_output</parameter></term>
|
||||
<term><parameter>binary</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the optional <parameter>raw_output</parameter> is set to &true;,
|
||||
If the optional <parameter>binary</parameter> is set to &true;,
|
||||
then the md5 digest is instead returned in raw binary format with a
|
||||
length of 16.
|
||||
</para>
|
||||
|
@ -93,7 +93,6 @@ if (md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.metaphone">
|
||||
<refentry xml:id="function.metaphone" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>metaphone</refname>
|
||||
<refpurpose>Calculate the metaphone key of a string</refpurpose>
|
||||
|
@ -9,12 +9,12 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>metaphone</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>phonemes</parameter><initializer>0</initializer></methodparam>
|
||||
<type>string</type><methodname>metaphone</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>max_phonemes</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates the metaphone key of <parameter>str</parameter>.
|
||||
Calculates the metaphone key of <parameter>string</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Similar to <function>soundex</function> metaphone creates the same key for
|
||||
|
@ -24,7 +24,7 @@
|
|||
</para>
|
||||
<para>
|
||||
Metaphone was developed by Lawrence Philips
|
||||
<lphilips at verity dot com>. It is described in ["Practical
|
||||
<lphilips at verity dot com>. It is described in ["Practical
|
||||
Algorithms for Programmers", Binstock & Rex, Addison Wesley,
|
||||
1995].
|
||||
</para>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -43,13 +43,13 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>phonemes</parameter></term>
|
||||
<term><parameter>max_phonemes</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This parameter restricts the returned metaphone key to
|
||||
<parameter>phonemes</parameter> <emphasis>characters</emphasis> in length.
|
||||
<parameter>max_phonemes</parameter> <emphasis>characters</emphasis> in length.
|
||||
However, the resulting phonemes are always transcribed completely, so the
|
||||
resulting string length may be slightly longer than <parameter>phonemes</parameter>.
|
||||
resulting string length may be slightly longer than <parameter>max_phonemes</parameter>.
|
||||
The default value of <literal>0</literal> means no restriction.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -61,10 +61,32 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the metaphone key as a string, &return.falseforfailure;.
|
||||
Returns the metaphone key as a string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
The function returned &false; on failure.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples"><!-- {{{ -->
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -89,7 +111,7 @@ string(6) "PRKRMR"
|
|||
</para>
|
||||
<para>
|
||||
<example xml:id="metaphone.example.phonemes"><!-- {{{ -->
|
||||
<title>Using the <parameter>phonemes</parameter> parameter</title>
|
||||
<title>Using the <parameter>max_phonemes</parameter> parameter</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -109,7 +131,7 @@ string(5) "PRKRM"
|
|||
</para>
|
||||
<para>
|
||||
<example xml:id="metaphone.example.phonemes-overlong">
|
||||
<title>Using the <parameter>phonemes</parameter> parameter</title>
|
||||
<title>Using the <parameter>max_phonemes</parameter> parameter</title>
|
||||
<simpara>
|
||||
In this example, <function>metaphone</function> is advised to produce a string
|
||||
of five characters, but that would require to split the final phoneme
|
||||
|
@ -134,7 +156,6 @@ string(6) "ASTRKS"
|
|||
</refsect1><!-- }}} -->
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.nl-langinfo">
|
||||
<refentry xml:id="function.nl-langinfo" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>nl_langinfo</refname>
|
||||
<refpurpose>Query language and locale information</refpurpose>
|
||||
|
@ -9,7 +9,7 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>nl_langinfo</methodname>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>nl_langinfo</methodname>
|
||||
<methodparam><type>int</type><parameter>item</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -36,8 +36,8 @@
|
|||
<table>
|
||||
<title>nl_langinfo Constants</title>
|
||||
<tgroup cols="2">
|
||||
<colspec colname="c1" />
|
||||
<colspec colname="c2" />
|
||||
<colspec colname="c1"/>
|
||||
<colspec colname="c2"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Constant</entry>
|
||||
|
@ -223,7 +223,7 @@
|
|||
</row>
|
||||
<row>
|
||||
<entry><constant>GROUPING</constant></entry>
|
||||
<entry></entry>
|
||||
<entry/>
|
||||
</row>
|
||||
<row>
|
||||
<entry namest="c1" nameend="c2" align="center"><emphasis>LC_MESSAGES Category Constants</emphasis></entry>
|
||||
|
@ -285,7 +285,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<methodsynopsis>
|
||||
<type>string</type><methodname>nl2br</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>is_xhtml</parameter><initializer>&true;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_xhtml</parameter><initializer>&true;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <parameter>string</parameter> with <code><br /></code> or
|
||||
|
@ -33,7 +33,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>is_xhtml</parameter></term>
|
||||
<term><parameter>use_xhtml</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to use XHTML compatible line breaks or not.
|
||||
|
@ -72,7 +72,7 @@ foo isn't<br />
|
|||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>Generating valid HTML markup using the <parameter>is_xhtml</parameter> parameter</title>
|
||||
<title>Generating valid HTML markup using the <parameter>use_xhtml</parameter> parameter</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -124,7 +124,6 @@ string<br />
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>ord</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>character</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Interprets the binary value of the first byte of
|
||||
<parameter>string</parameter> as an unsigned integer between 0 and 255.
|
||||
<parameter>character</parameter> as an unsigned integer between 0 and 255.
|
||||
</para>
|
||||
<para>
|
||||
If the string is in a single-byte encoding, such as ASCII, ISO-8859, or Windows 1252, this is equivalent to returning the position of a character in the character set's mapping table. However, note that this function is not aware of any string encoding, and in particular will never identify a Unicode code point in a multi-byte encoding such as UTF-8 or UTF-16.
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<term><parameter>character</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A character.
|
||||
|
@ -102,7 +102,6 @@ Byte 3 of $str has value 152
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-str">
|
||||
<refentry xml:id="function.parse-str" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>parse_str</refname>
|
||||
<refpurpose>Parses the string into variables</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>parse_str</methodname>
|
||||
<methodparam><type>string</type><parameter>encoded_string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter role="reference">result</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter role="reference">result</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Parses <parameter>encoded_string</parameter> as if it were the query string
|
||||
Parses <parameter>string</parameter> as if it were the query string
|
||||
passed via a URL and sets variables in the current scope (or in the array
|
||||
if <parameter>result</parameter> is provided).
|
||||
</para>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>encoded_string</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -79,6 +79,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>result</parameter> is no longer optional.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.2.0</entry>
|
||||
<entry>
|
||||
|
@ -181,7 +187,6 @@ echo $output['My_Value']; // Something
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>quoted_printable_decode</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns an 8-bit binary string corresponding to the decoded
|
||||
|
@ -30,7 +30,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -58,7 +58,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>quoted_printable_encode</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a quoted printable string created according to <link
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -56,7 +56,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.quotemeta">
|
||||
<refentry xml:id="function.quotemeta" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>quotemeta</refname>
|
||||
<refpurpose>Quote meta characters</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>quotemeta</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a version of str with a backslash character (<literal>\</literal>)
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -39,7 +39,7 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the string with meta characters quoted, or &false; if an empty
|
||||
string is given as <parameter>str</parameter>.
|
||||
string is given as <parameter>string</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -66,7 +66,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.rtrim">
|
||||
<refentry xml:id="function.rtrim" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>rtrim</refname>
|
||||
<refpurpose>Strip whitespace (or other characters) from the end of a string</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>rtrim</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>character_mask</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\0"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a string with whitespace (or other characters) stripped from the
|
||||
end of <parameter>str</parameter>.
|
||||
end of <parameter>string</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Without the second parameter,
|
||||
|
@ -67,7 +67,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -75,11 +75,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>character_mask</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You can also specify the characters you want to strip, by means
|
||||
of the <parameter>character_mask</parameter> parameter.
|
||||
of the <parameter>characters</parameter> parameter.
|
||||
Simply list all characters that you want to be stripped. With
|
||||
<literal>..</literal> you can specify a range of characters.
|
||||
</para>
|
||||
|
@ -158,7 +158,6 @@ string(15) " Example string"
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>sha1_file</methodname>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>sha1_file</methodname>
|
||||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Calculates the sha1 hash of the file specified by
|
||||
|
@ -33,7 +33,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>raw_output</parameter></term>
|
||||
<term><parameter>binary</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When &true;, returns the digest in raw binary format with a length of
|
||||
|
@ -87,7 +87,6 @@ foreach(glob('/home/Kalle/myproject/*.php') as $ent)
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>sha1</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>raw_output</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>binary</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
Calculates the sha1 hash of <parameter>str</parameter> using the
|
||||
Calculates the sha1 hash of <parameter>string</parameter> using the
|
||||
<link xlink:href="&url.rfc;3174">US Secure Hash Algorithm 1</link>.
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -36,10 +36,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>raw_output</parameter></term>
|
||||
<term><parameter>binary</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the optional <parameter>raw_output</parameter> is set to &true;,
|
||||
If the optional <parameter>binary</parameter> is set to &true;,
|
||||
then the sha1 digest is instead returned in raw binary format with a
|
||||
length of 20, otherwise the returned value is a 40-character
|
||||
hexadecimal number.
|
||||
|
@ -92,7 +92,6 @@ if (sha1($str) === 'd0be2dc421be4fcd0172e5afceea3970e2f3d940') {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.similar-text">
|
||||
<refentry xml:id="function.similar-text" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>similar_text</refname>
|
||||
<refpurpose>Calculate the similarity between two strings</refpurpose>
|
||||
|
@ -10,9 +10,9 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>similar_text</methodname>
|
||||
<methodparam><type>string</type><parameter>first</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>second</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>float</type><parameter role="reference">percent</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string2</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>float</type><parameter role="reference">percent</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This calculates the similarity between two strings as described in
|
||||
|
@ -28,7 +28,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>first</parameter></term>
|
||||
<term><parameter>string1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The first string.
|
||||
|
@ -36,15 +36,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>second</parameter></term>
|
||||
<term><parameter>string2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The second string.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Swapping the <parameter>first</parameter> and
|
||||
<parameter>second</parameter> may yield a different result; see the
|
||||
Swapping the <parameter>string1</parameter> and
|
||||
<parameter>string2</parameter> may yield a different result; see the
|
||||
example below.
|
||||
</para>
|
||||
</note>
|
||||
|
@ -83,8 +83,8 @@
|
|||
<example xml:id="similar_text.example.swapping">
|
||||
<title><function>similar_text</function> argument swapping example</title>
|
||||
<para>
|
||||
This example shows that swapping the <parameter>first</parameter> and
|
||||
<parameter>second</parameter> argument may yield different results.
|
||||
This example shows that swapping the <parameter>string1</parameter> and
|
||||
<parameter>string2</parameter> argument may yield different results.
|
||||
</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
|
@ -116,7 +116,6 @@ similarity: 3 (42.857142857143 %)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.soundex">
|
||||
<refentry xml:id="function.soundex" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>soundex</refname>
|
||||
<refpurpose>Calculate the soundex key of a string</refpurpose>
|
||||
|
@ -9,11 +9,11 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>soundex</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<type>string</type><methodname>soundex</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Calculates the soundex key of <parameter>str</parameter>.
|
||||
Calculates the soundex key of <parameter>string</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Soundex keys have the property that words pronounced similarly
|
||||
|
@ -34,7 +34,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -48,10 +48,33 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the soundex key as a &string;, &return.falseforfailure;.
|
||||
Returns the soundex key as a &string;.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Prior to this version, calling the function with an empty string returned &false;
|
||||
for no particular reason.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -85,7 +108,6 @@ soundex("Lukasiewicz") == soundex("Lissajous"); // L222
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.sscanf" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refentry xml:id="function.sscanf" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>sscanf</refname>
|
||||
<refpurpose>Parses input from a string according to a format</refpurpose>
|
||||
|
@ -9,15 +9,15 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>sscanf</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<type class="union"><type>array</type><type>int</type><type>null</type></type><methodname>sscanf</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>format</parameter></methodparam>
|
||||
<methodparam rep="repeat"><type>mixed</type><parameter role="reference">vars</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<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
|
||||
from the string <parameter>string</parameter> and interprets it
|
||||
according to the specified <parameter>format</parameter>, which is
|
||||
described in the documentation for <function>sprintf</function>.
|
||||
</para>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input <type>string</type> being parsed.
|
||||
|
@ -44,7 +44,7 @@
|
|||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The interpreted format for <parameter>str</parameter>, which is
|
||||
The interpreted format for <parameter>string</parameter>, which is
|
||||
described in the documentation for <function>sprintf</function> with
|
||||
following differences:
|
||||
<simplelist>
|
||||
|
@ -93,8 +93,8 @@
|
|||
</para>
|
||||
<para>
|
||||
If there are more substrings expected in the <parameter>format</parameter>
|
||||
than there are available within <parameter>str</parameter>,
|
||||
<literal>-1</literal> will be returned.
|
||||
than there are available within <parameter>string</parameter>,
|
||||
&null; will be returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -159,7 +159,6 @@ echo "<author id='$id'>
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-getcsv">
|
||||
<refentry xml:id="function.str-getcsv" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_getcsv</refname>
|
||||
<refpurpose>
|
||||
|
@ -12,10 +12,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>str_getcsv</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>delimiter</parameter><initializer>","</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>enclosure</parameter><initializer>'"'</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>escape</parameter><initializer>"\\"</initializer></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>","</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>enclosure</parameter><initializer>"\""</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>escape</parameter><initializer>'\\'</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Parses a string input for fields in <acronym>CSV</acronym> format
|
||||
|
@ -35,7 +35,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to parse.
|
||||
|
@ -43,7 +43,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>delimiter</parameter></term>
|
||||
<term><parameter>separator</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set the field delimiter (one character only).
|
||||
|
@ -126,7 +126,6 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-ireplace">
|
||||
<refentry xml:id="function.str-ireplace" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_ireplace</refname>
|
||||
<refpurpose>Case-insensitive version of <function>str_replace</function></refpurpose>
|
||||
|
@ -9,11 +9,11 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>str_ireplace</methodname>
|
||||
<methodparam><type>mixed</type><parameter>search</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>replace</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>subject</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter role="reference">count</parameter></methodparam>
|
||||
<type class="union"><type>string</type><type>array</type></type><methodname>str_ireplace</methodname>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>search</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>replace</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>subject</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter role="reference">count</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a string or an array with all occurrences of
|
||||
|
@ -140,7 +140,6 @@ echo $bodytag; // <body text=black>
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-pad">
|
||||
<refentry xml:id="function.str-pad" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_pad</refname>
|
||||
<refpurpose>Pad a string to a certain length with another string</refpurpose>
|
||||
|
@ -10,17 +10,17 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>str_pad</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>pad_length</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>pad_string</parameter><initializer>" "</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>pad_type</parameter><initializer>STR_PAD_RIGHT</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>pad_type</parameter><initializer><constant>STR_PAD_RIGHT</constant></initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns the <parameter>input</parameter> string
|
||||
This function returns the <parameter>string</parameter> string
|
||||
padded on the left, the right, or both sides to the specified
|
||||
padding length. If the optional argument
|
||||
<parameter>pad_string</parameter> is not supplied, the
|
||||
<parameter>input</parameter> is padded with spaces, otherwise it
|
||||
<parameter>string</parameter> is padded with spaces, otherwise it
|
||||
is padded with characters from <parameter>pad_string</parameter>
|
||||
up to the limit.
|
||||
</para>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -39,12 +39,12 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pad_length</parameter></term>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the value of <parameter>pad_length</parameter> is negative,
|
||||
If the value of <parameter>length</parameter> is negative,
|
||||
less than, or equal to the length of the input string, no padding
|
||||
takes place, and <parameter>input</parameter> will be returned.
|
||||
takes place, and <parameter>string</parameter> will be returned.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -106,7 +106,6 @@ echo str_pad($input, 3, "*"); // produces "Alien"
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-repeat">
|
||||
<refentry xml:id="function.str-repeat" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_repeat</refname>
|
||||
<refpurpose>Repeat a string</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>str_repeat</methodname>
|
||||
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>multiplier</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>times</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns <parameter>input</parameter> repeated
|
||||
<parameter>multiplier</parameter> times.
|
||||
Returns <parameter>string</parameter> repeated
|
||||
<parameter>times</parameter> times.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to be repeated.
|
||||
|
@ -32,15 +32,15 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>multiplier</parameter></term>
|
||||
<term><parameter>times</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of time the <parameter>input</parameter> string should be
|
||||
Number of time the <parameter>string</parameter> string should be
|
||||
repeated.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>multiplier</parameter> has to be greater than or equal to 0.
|
||||
If the <parameter>multiplier</parameter> is set to 0, the function
|
||||
<parameter>times</parameter> has to be greater than or equal to 0.
|
||||
If the <parameter>times</parameter> is set to 0, the function
|
||||
will return an empty string.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -90,7 +90,6 @@ echo str_repeat("-=", 10);
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-replace">
|
||||
<refentry xml:id="function.str-replace" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_replace</refname>
|
||||
<refpurpose>Replace all occurrences of the search string with the replacement string</refpurpose>
|
||||
|
@ -9,11 +9,11 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>str_replace</methodname>
|
||||
<methodparam><type>mixed</type><parameter>search</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>replace</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>subject</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter role="reference">count</parameter></methodparam>
|
||||
<type class="union"><type>string</type><type>array</type></type><methodname>str_replace</methodname>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>search</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>replace</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>string</type><type>array</type></type><parameter>subject</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter role="reference">count</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a string or an array with all occurrences of
|
||||
|
@ -194,7 +194,6 @@ echo $output;
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id='function.str-rot13'>
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-rot13">
|
||||
<refnamediv>
|
||||
<refname>str_rot13</refname>
|
||||
<refpurpose>Perform the rot13 transform on a string</refpurpose>
|
||||
|
@ -10,10 +10,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>str_rot13</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Performs the ROT13 encoding on the <parameter>str</parameter> argument and
|
||||
Performs the ROT13 encoding on the <parameter>string</parameter> argument and
|
||||
returns the resulting string.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -66,7 +66,6 @@ echo str_rot13('PHP 4.3.0'); // CUC 4.3.0
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.str-shuffle">
|
||||
<refentry xml:id="function.str-shuffle" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>str_shuffle</refname>
|
||||
<refpurpose>Randomly shuffles a string</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>str_shuffle</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
<function>str_shuffle</function> shuffles a string. One permutation
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -97,7 +97,6 @@ echo $shuffled;
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-split">
|
||||
<refentry xml:id="function.str-split" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_split</refname>
|
||||
<refpurpose>Convert a string to an array</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<methodsynopsis>
|
||||
<type>array</type><methodname>str_split</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>split_length</parameter><initializer>1</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>1</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Converts a string to an array.
|
||||
|
@ -31,7 +31,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>split_length</parameter></term>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Maximum length of the chunk.
|
||||
|
@ -45,14 +45,14 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
If the optional <parameter>split_length</parameter> parameter is
|
||||
If the optional <parameter>length</parameter> parameter is
|
||||
specified, the returned array will be broken down into chunks with each
|
||||
being <parameter>split_length</parameter> in length, otherwise each chunk
|
||||
being <parameter>length</parameter> in length, otherwise each chunk
|
||||
will be one character in length.
|
||||
</para>
|
||||
<para>
|
||||
&false; is returned if <parameter>split_length</parameter> is less than 1.
|
||||
If the <parameter>split_length</parameter> length exceeds the length of
|
||||
&false; is returned if <parameter>length</parameter> is less than 1.
|
||||
If the <parameter>length</parameter> length exceeds the length of
|
||||
<parameter>string</parameter>, the entire string is returned as the first
|
||||
(and only) array element.
|
||||
</para>
|
||||
|
@ -134,7 +134,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-word-count">
|
||||
<refentry xml:id="function.str-word-count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>str_word_count</refname>
|
||||
<refpurpose>
|
||||
|
@ -10,10 +10,10 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>str_word_count</methodname>
|
||||
<type class="union"><type>array</type><type>int</type></type><methodname>str_word_count</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>characters</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Counts the number of words inside <parameter>string</parameter>.
|
||||
|
@ -73,7 +73,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>charlist</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A list of additional characters which will be considered as 'word'
|
||||
|
@ -92,6 +92,28 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>characters</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -168,7 +190,6 @@ Array
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strcoll">
|
||||
<refentry xml:id="function.strcoll" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strcoll</refname>
|
||||
<refpurpose>Locale based string comparison</refpurpose>
|
||||
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strcoll</methodname>
|
||||
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Note that this comparison is case sensitive, and unlike
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str1</parameter></term>
|
||||
<term><parameter>string1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The first string.
|
||||
|
@ -37,7 +37,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>str2</parameter></term>
|
||||
<term><parameter>string2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The second string.
|
||||
|
@ -51,10 +51,10 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>str1</parameter> is less than
|
||||
<parameter>str2</parameter>; > 0 if
|
||||
<parameter>str1</parameter> is greater than
|
||||
<parameter>str2</parameter>, and 0 if they are equal.
|
||||
Returns < 0 if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; > 0 if
|
||||
<parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and 0 if they are equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -76,7 +76,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strcspn">
|
||||
<refentry xml:id="function.strcspn" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strcspn</refname>
|
||||
<refpurpose>Find length of initial segment not matching mask</refpurpose>
|
||||
|
@ -10,22 +10,22 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strcspn</methodname>
|
||||
<methodparam><type>string</type><parameter>subject</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>mask</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>start</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>characters</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the length of the initial segment of
|
||||
<parameter>subject</parameter> which does <emphasis>not</emphasis>
|
||||
contain any of the characters in <parameter>mask</parameter>.
|
||||
<parameter>string</parameter> which does <emphasis>not</emphasis>
|
||||
contain any of the characters in <parameter>characters</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> and <parameter>length</parameter>
|
||||
are omitted, then all of <parameter>subject</parameter> will be
|
||||
If <parameter>offset</parameter> and <parameter>length</parameter>
|
||||
are omitted, then all of <parameter>string</parameter> will be
|
||||
examined. If they are included, then the effect will be the same as
|
||||
calling <literal>strcspn(substr($subject, $start, $length),
|
||||
$mask)</literal> (see <xref linkend="function.substr" />
|
||||
$mask)</literal> (see <xref linkend="function.substr"/>
|
||||
for more information).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>subject</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to examine.
|
||||
|
@ -43,7 +43,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mask</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string containing every disallowed character.
|
||||
|
@ -51,28 +51,28 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>start</parameter></term>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The position in <parameter>subject</parameter> to
|
||||
The position in <parameter>string</parameter> to
|
||||
start searching.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> is given and is non-negative,
|
||||
If <parameter>offset</parameter> is given and is non-negative,
|
||||
then <function>strcspn</function> will begin
|
||||
examining <parameter>subject</parameter> at
|
||||
the <parameter>start</parameter>'th position. For instance, in
|
||||
examining <parameter>string</parameter> at
|
||||
the <parameter>offset</parameter>'th position. For instance, in
|
||||
the string '<literal>abcdef</literal>', the character at
|
||||
position <literal>0</literal> is '<literal>a</literal>', the
|
||||
character at position <literal>2</literal> is
|
||||
'<literal>c</literal>', and so forth.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> is given and is negative,
|
||||
If <parameter>offset</parameter> is given and is negative,
|
||||
then <function>strcspn</function> will begin
|
||||
examining <parameter>subject</parameter> at
|
||||
the <parameter>start</parameter>'th position from the end
|
||||
of <parameter>subject</parameter>.
|
||||
examining <parameter>string</parameter> at
|
||||
the <parameter>offset</parameter>'th position from the end
|
||||
of <parameter>string</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -80,20 +80,20 @@
|
|||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the segment from <parameter>subject</parameter>
|
||||
The length of the segment from <parameter>string</parameter>
|
||||
to examine.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>length</parameter> is given and is non-negative,
|
||||
then <parameter>subject</parameter> will be examined
|
||||
then <parameter>string</parameter> will be examined
|
||||
for <parameter>length</parameter> characters after the starting
|
||||
position.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>length</parameter> is given and is negative,
|
||||
then <parameter>subject</parameter> will be examined from the
|
||||
then <parameter>string</parameter> will be examined from the
|
||||
starting position up to <parameter>length</parameter>
|
||||
characters from the end of <parameter>subject</parameter>.
|
||||
characters from the end of <parameter>string</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -104,18 +104,40 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the length of the initial segment of <parameter>subject</parameter>
|
||||
which consists entirely of characters <emphasis>not</emphasis> in <parameter>mask</parameter>.
|
||||
Returns the length of the initial segment of <parameter>string</parameter>
|
||||
which consists entirely of characters <emphasis>not</emphasis> in <parameter>characters</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
When a <parameter>start</parameter> parameter is set, the returned length
|
||||
When a <parameter>offset</parameter> parameter is set, the returned length
|
||||
is counted starting from this position, not from the beginning of
|
||||
<parameter>subject</parameter>.
|
||||
<parameter>string</parameter>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example xml:id="strcspn.example">
|
||||
|
@ -168,7 +190,6 @@ int(4)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strip-tags">
|
||||
<refentry xml:id="function.strip-tags" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strip_tags</refname>
|
||||
<refpurpose>Strip HTML and PHP tags from a string</refpurpose>
|
||||
|
@ -10,12 +10,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>strip_tags</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>allowable_tags</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>array</type><type>string</type><type>null</type></type><parameter>allowed_tags</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function tries to return a string with all NULL bytes, HTML and PHP tags stripped
|
||||
from a given <parameter>str</parameter>. It uses the same tag stripping
|
||||
from a given <parameter>string</parameter>. It uses the same tag stripping
|
||||
state machine as the <function>fgetss</function> function.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -33,7 +33,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>allowable_tags</parameter></term>
|
||||
<term><parameter>allowed_tags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You can use the optional second parameter to specify tags which should
|
||||
|
@ -44,14 +44,14 @@
|
|||
<note>
|
||||
<para>
|
||||
HTML comments and PHP tags are also stripped. This is hardcoded and
|
||||
can not be changed with <parameter>allowable_tags</parameter>.
|
||||
can not be changed with <parameter>allowed_tags</parameter>.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<para>
|
||||
In PHP 5.3.4 and later, self-closing
|
||||
XHTML tags are ignored and only non-self-closing tags should be used in
|
||||
<parameter>allowable_tags</parameter>. For example,
|
||||
<parameter>allowed_tags</parameter>. For example,
|
||||
to allow both <literal><br></literal> and
|
||||
<literal><br/></literal>, you should use:
|
||||
</para>
|
||||
|
@ -90,10 +90,16 @@ strip_tags($input, '<br>');
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>allowed_tags</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.4.0</entry>
|
||||
<entry>
|
||||
The <parameter>allowable_tags</parameter> now alternatively accepts an &array;.
|
||||
The <parameter>allowed_tags</parameter> now alternatively accepts an &array;.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@ -152,7 +158,7 @@ Test paragraph. Other text
|
|||
<warning>
|
||||
<para>
|
||||
This function does not modify any attributes on the tags that you allow
|
||||
using <parameter>allowable_tags</parameter>, including the
|
||||
using <parameter>allowed_tags</parameter>, including the
|
||||
<literal>style</literal> and <literal>onmouseover</literal> attributes
|
||||
that a mischievous user may abuse when posting text that will be shown
|
||||
to other users.
|
||||
|
@ -162,7 +168,7 @@ Test paragraph. Other text
|
|||
<para>
|
||||
Tag names within the input HTML that are greater than 1023 bytes in length
|
||||
will be treated as though they are invalid, regardless of the
|
||||
<parameter>allowable_tags</parameter> parameter.
|
||||
<parameter>allowed_tags</parameter> parameter.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
@ -177,7 +183,6 @@ Test paragraph. Other text
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stripcslashes">
|
||||
<refentry xml:id="function.stripcslashes" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>stripcslashes</refname>
|
||||
<refpurpose>Un-quote string quoted with <function>addcslashes</function></refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>stripcslashes</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string with backslashes stripped off. Recognizes
|
||||
|
@ -24,7 +24,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to be unescaped.
|
||||
|
@ -52,7 +52,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stripos">
|
||||
<refentry xml:id="function.stripos" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>stripos</refname>
|
||||
<refpurpose>Find the position of the first occurrence of a case-insensitive substring in a string</refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>stripos</methodname>
|
||||
<type class="union"><type>int</type><type>false</type></type><methodname>stripos</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -84,6 +84,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -157,7 +163,6 @@ if ($pos2 !== false) {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stripslashes">
|
||||
<refentry xml:id="function.stripslashes" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>stripslashes</refname>
|
||||
<refpurpose>Un-quotes a quoted string</refpurpose>
|
||||
|
@ -10,7 +10,7 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>stripslashes</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Un-quotes a quoted string.
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -129,7 +129,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.stristr">
|
||||
<refentry xml:id="function.stristr" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>stristr</refname>
|
||||
<refpurpose>Case-insensitive <function>strstr</function></refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>stristr</methodname>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>stristr</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>before_needle</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -76,6 +76,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -155,7 +161,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strnatcasecmp</methodname>
|
||||
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function implements a comparison algorithm that orders alphanumeric
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str1</parameter></term>
|
||||
<term><parameter>string1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The first string.
|
||||
|
@ -35,7 +35,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>str2</parameter></term>
|
||||
<term><parameter>string2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The second string.
|
||||
|
@ -50,9 +50,9 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Similar to other string comparison functions, this one returns < 0 if
|
||||
<parameter>str1</parameter> is less than <parameter>str2</parameter> >
|
||||
0 if <parameter>str1</parameter> is greater than
|
||||
<parameter>str2</parameter>, and 0 if they are equal.
|
||||
<parameter>string1</parameter> is less than <parameter>string2</parameter> >
|
||||
0 if <parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and 0 if they are equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -74,7 +74,6 @@
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strnatcmp</methodname>
|
||||
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string1</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string2</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function implements a comparison algorithm that orders
|
||||
|
@ -26,7 +26,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str1</parameter></term>
|
||||
<term><parameter>string1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The first string.
|
||||
|
@ -34,7 +34,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>str2</parameter></term>
|
||||
<term><parameter>string2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The second string.
|
||||
|
@ -49,9 +49,9 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Similar to other string comparison functions, this one returns < 0 if
|
||||
<parameter>str1</parameter> is less than <parameter>str2</parameter>; >
|
||||
0 if <parameter>str1</parameter> is greater than
|
||||
<parameter>str2</parameter>, and 0 if they are equal.
|
||||
<parameter>string1</parameter> is less than <parameter>string2</parameter>; >
|
||||
0 if <parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and 0 if they are equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -124,7 +124,6 @@ Array
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strpbrk">
|
||||
<refentry xml:id="function.strpbrk" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strpbrk</refname>
|
||||
<refpurpose>Search a string for any of a set of characters</refpurpose>
|
||||
|
@ -9,13 +9,13 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>strpbrk</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>char_list</parameter></methodparam>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>strpbrk</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>characters</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>strpbrk</function> searches the <parameter>haystack</parameter>
|
||||
string for a <parameter>char_list</parameter>.
|
||||
<function>strpbrk</function> searches the <parameter>string</parameter>
|
||||
string for a <parameter>characters</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -24,15 +24,15 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>haystack</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string where <parameter>char_list</parameter> is looked for.
|
||||
The string where <parameter>characters</parameter> is looked for.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>char_list</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This parameter is case sensitive.
|
||||
|
@ -86,7 +86,6 @@ echo strpbrk($text, 'S');
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strpos">
|
||||
<refentry xml:id="function.strpos" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strpos</refname>
|
||||
<refpurpose>Find the position of the first occurrence of a substring in a string</refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strpos</methodname>
|
||||
<type class="union"><type>int</type><type>false</type></type><methodname>strpos</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -76,6 +76,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -180,7 +186,6 @@ $pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strrchr">
|
||||
<refentry xml:id="function.strrchr" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strrchr</refname>
|
||||
<refpurpose>Find the last occurrence of a character in a string</refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>strrchr</methodname>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>strrchr</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns the portion of <parameter>haystack</parameter> which
|
||||
|
@ -66,6 +66,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -114,7 +120,6 @@ $last = substr(strrchr($text, 10), 1 );
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strripos">
|
||||
<refentry xml:id="function.strripos" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strripos</refname>
|
||||
<refpurpose>Find the position of the last occurrence of a case-insensitive substring in a string</refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strripos</methodname>
|
||||
<type class="union"><type>int</type><type>false</type></type><methodname>strripos</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -98,6 +98,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -157,7 +163,6 @@ if ($pos === false) {
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strrpos">
|
||||
<refentry xml:id="function.strrpos" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strrpos</refname>
|
||||
<refpurpose>Find the position of the last occurrence of a substring in a string</refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strrpos</methodname>
|
||||
<type class="union"><type>int</type><type>false</type></type><methodname>strrpos</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -94,6 +94,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -190,7 +196,6 @@ int(29)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strspn">
|
||||
<refentry xml:id="function.strspn" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strspn</refname>
|
||||
<refpurpose>
|
||||
|
@ -13,21 +13,21 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>strspn</methodname>
|
||||
<methodparam><type>string</type><parameter>subject</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>mask</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>start</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>characters</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Finds the length of the initial segment of <parameter>subject</parameter>
|
||||
that contains <emphasis>only</emphasis> characters from <parameter>mask</parameter>.
|
||||
Finds the length of the initial segment of <parameter>string</parameter>
|
||||
that contains <emphasis>only</emphasis> characters from <parameter>characters</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> and <parameter>length</parameter>
|
||||
are omitted, then all of <parameter>subject</parameter> will be
|
||||
If <parameter>offset</parameter> and <parameter>length</parameter>
|
||||
are omitted, then all of <parameter>string</parameter> will be
|
||||
examined. If they are included, then the effect will be the same as
|
||||
calling <literal>strspn(substr($subject, $start, $length),
|
||||
$mask)</literal> (see <xref linkend="function.substr" />
|
||||
$mask)</literal> (see <xref linkend="function.substr"/>
|
||||
for more information).
|
||||
</para>
|
||||
<para>
|
||||
|
@ -43,7 +43,7 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
|
|||
</informalexample>
|
||||
will assign <literal>2</literal> to <varname>$var</varname>,
|
||||
because the string "42" is the initial segment
|
||||
of <parameter>subject</parameter> that consists only of characters
|
||||
of <parameter>string</parameter> that consists only of characters
|
||||
contained within "1234567890".
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -53,7 +53,7 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>subject</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The string to examine.
|
||||
|
@ -61,7 +61,7 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>mask</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The list of allowable characters.
|
||||
|
@ -69,28 +69,28 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>start</parameter></term>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The position in <parameter>subject</parameter> to
|
||||
The position in <parameter>string</parameter> to
|
||||
start searching.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> is given and is non-negative,
|
||||
If <parameter>offset</parameter> is given and is non-negative,
|
||||
then <function>strspn</function> will begin
|
||||
examining <parameter>subject</parameter> at
|
||||
the <parameter>start</parameter>'th position. For instance, in
|
||||
examining <parameter>string</parameter> at
|
||||
the <parameter>offset</parameter>'th position. For instance, in
|
||||
the string '<literal>abcdef</literal>', the character at
|
||||
position <literal>0</literal> is '<literal>a</literal>', the
|
||||
character at position <literal>2</literal> is
|
||||
'<literal>c</literal>', and so forth.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> is given and is negative,
|
||||
If <parameter>offset</parameter> is given and is negative,
|
||||
then <function>strspn</function> will begin
|
||||
examining <parameter>subject</parameter> at
|
||||
the <parameter>start</parameter>'th position from the end
|
||||
of <parameter>subject</parameter>.
|
||||
examining <parameter>string</parameter> at
|
||||
the <parameter>offset</parameter>'th position from the end
|
||||
of <parameter>string</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -98,20 +98,20 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
|
|||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the segment from <parameter>subject</parameter>
|
||||
The length of the segment from <parameter>string</parameter>
|
||||
to examine.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>length</parameter> is given and is non-negative,
|
||||
then <parameter>subject</parameter> will be examined
|
||||
then <parameter>string</parameter> will be examined
|
||||
for <parameter>length</parameter> characters after the starting
|
||||
position.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>length</parameter> is given and is negative,
|
||||
then <parameter>subject</parameter> will be examined from the
|
||||
then <parameter>string</parameter> will be examined from the
|
||||
starting position up to <parameter>length</parameter>
|
||||
characters from the end of <parameter>subject</parameter>.
|
||||
characters from the end of <parameter>string</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -122,18 +122,40 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the length of the initial segment of <parameter>subject</parameter>
|
||||
which consists entirely of characters in <parameter>mask</parameter>.
|
||||
Returns the length of the initial segment of <parameter>string</parameter>
|
||||
which consists entirely of characters in <parameter>characters</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
When a <parameter>start</parameter> parameter is set, the returned length
|
||||
When a <parameter>offset</parameter> parameter is set, the returned length
|
||||
is counted starting from this position, not from the beginning of
|
||||
<parameter>subject</parameter>.
|
||||
<parameter>string</parameter>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -180,7 +202,6 @@ int(1)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.strstr">
|
||||
<refentry xml:id="function.strstr" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>strstr</refname>
|
||||
<refpurpose>Find the first occurrence of a string</refpurpose>
|
||||
|
@ -9,9 +9,9 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>strstr</methodname>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>strstr</methodname>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>before_needle</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
|
@ -86,6 +86,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
Passing an &integer; as <parameter>needle</parameter> is no longer supported.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.3.0</entry>
|
||||
<entry>
|
||||
|
@ -133,7 +139,6 @@ echo $user; // prints name
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.substr-compare">
|
||||
<refentry xml:id="function.substr-compare" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>substr_compare</refname>
|
||||
<refpurpose>Binary safe comparison of two strings from an offset, up to length characters</refpurpose>
|
||||
|
@ -10,15 +10,15 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>substr_compare</methodname>
|
||||
<methodparam><type>string</type><parameter>main_str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>case_insensitivity</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>case_insensitive</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>substr_compare</function> compares <parameter>main_str</parameter>
|
||||
from position <parameter>offset</parameter> with <parameter>str</parameter>
|
||||
<function>substr_compare</function> compares <parameter>haystack</parameter>
|
||||
from position <parameter>offset</parameter> with <parameter>needle</parameter>
|
||||
up to <parameter>length</parameter> characters.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>main_str</parameter></term>
|
||||
<term><parameter>haystack</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The main string being compared.
|
||||
|
@ -36,7 +36,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>needle</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The secondary string being compared.
|
||||
|
@ -57,17 +57,17 @@
|
|||
<listitem>
|
||||
<para>
|
||||
The length of the comparison. The default value is the largest of the
|
||||
length of the <parameter>str</parameter> compared to the length of
|
||||
<parameter>main_str</parameter> minus the
|
||||
length of the <parameter>needle</parameter> compared to the length of
|
||||
<parameter>haystack</parameter> minus the
|
||||
<parameter>offset</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>case_insensitivity</parameter></term>
|
||||
<term><parameter>case_insensitive</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>case_insensitivity</parameter> is &true;, comparison is
|
||||
If <parameter>case_insensitive</parameter> is &true;, comparison is
|
||||
case insensitive.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -79,11 +79,11 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>main_str</parameter> from position
|
||||
<parameter>offset</parameter> is less than <parameter>str</parameter>, >
|
||||
0 if it is greater than <parameter>str</parameter>, and 0 if they are equal.
|
||||
Returns < 0 if <parameter>haystack</parameter> from position
|
||||
<parameter>offset</parameter> is less than <parameter>needle</parameter>, >
|
||||
0 if it is greater than <parameter>needle</parameter>, and 0 if they are equal.
|
||||
If <parameter>offset</parameter> is equal to (prior to PHP 7.2.18, 7.3.5) or
|
||||
greater than the length of <parameter>main_str</parameter>, or the
|
||||
greater than the length of <parameter>haystack</parameter>, or the
|
||||
<parameter>length</parameter> is set and is less than 0,
|
||||
(or, prior to PHP 5.5.11, less than 1)
|
||||
<function>substr_compare</function> prints a warning and returns
|
||||
|
@ -103,10 +103,16 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.2.18, 7.3.5</entry>
|
||||
<entry>
|
||||
<parameter>offset</parameter> may now be equal to the length of <parameter>main_str</parameter>.
|
||||
<parameter>offset</parameter> may now be equal to the length of <parameter>haystack</parameter>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@ -147,7 +153,6 @@ echo substr_compare("abcde", "abc", 5, 1); // warning
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.27 -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.substr-count">
|
||||
<refentry xml:id="function.substr-count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>substr_count</refname>
|
||||
<refpurpose>Count the number of substring occurrences</refpurpose>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>substr_count</function> returns the number of times the
|
||||
|
@ -91,6 +91,12 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.1.0</entry>
|
||||
<entry>
|
||||
|
@ -149,7 +155,6 @@ echo substr_count($text2, 'gcdgcd');
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.substr-replace">
|
||||
<refentry xml:id="function.substr-replace" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>substr_replace</refname>
|
||||
<refpurpose>Replace text within a portion of a string</refpurpose>
|
||||
|
@ -9,18 +9,18 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>substr_replace</methodname>
|
||||
<methodparam><type>mixed</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>replacement</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>start</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>length</parameter></methodparam>
|
||||
<type class="union"><type>string</type><type>array</type></type><methodname>substr_replace</methodname>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>string</type></type><parameter>replace</parameter></methodparam>
|
||||
<methodparam><type class="union"><type>array</type><type>int</type></type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>array</type><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>substr_replace</function> replaces a copy of
|
||||
<parameter>string</parameter> delimited by the
|
||||
<parameter>start</parameter> and (optionally)
|
||||
<parameter>offset</parameter> and (optionally)
|
||||
<parameter>length</parameter> parameters with the string given in
|
||||
<parameter>replacement</parameter>.
|
||||
<parameter>replace</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
<para>
|
||||
An <type>array</type> of <type>string</type>s can be provided, in which
|
||||
case the replacements will occur on each string in turn. In this case,
|
||||
the <parameter>replacement</parameter>, <parameter>start</parameter>
|
||||
the <parameter>replace</parameter>, <parameter>offset</parameter>
|
||||
and <parameter>length</parameter> parameters may be provided either as
|
||||
scalar values to be applied to each input string in turn, or as
|
||||
<type>array</type>s, in which case the corresponding array element will
|
||||
|
@ -46,7 +46,7 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>replacement</parameter></term>
|
||||
<term><parameter>replace</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The replacement string.
|
||||
|
@ -54,16 +54,16 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>start</parameter></term>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>start</parameter> is non-negative, the replacing will
|
||||
begin at the <parameter>start</parameter>'th offset into
|
||||
If <parameter>offset</parameter> is non-negative, the replacing will
|
||||
begin at the <parameter>offset</parameter>'th offset into
|
||||
<parameter>string</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> is negative, the replacing will
|
||||
begin at the <parameter>start</parameter>'th character from the
|
||||
If <parameter>offset</parameter> is negative, the replacing will
|
||||
begin at the <parameter>offset</parameter>'th character from the
|
||||
end of <parameter>string</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
@ -80,9 +80,9 @@
|
|||
<parameter>string</parameter> ); i.e. end the replacing at the
|
||||
end of <parameter>string</parameter>. Of course, if
|
||||
<parameter>length</parameter> is zero then this function will have the
|
||||
effect of inserting <parameter>replacement</parameter> into
|
||||
effect of inserting <parameter>replace</parameter> into
|
||||
<parameter>string</parameter> at the given
|
||||
<parameter>start</parameter> offset.
|
||||
<parameter>offset</parameter> offset.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -98,6 +98,30 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<para>
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -180,7 +204,6 @@ A: AAAXX; B: BBBX; C: CCC
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.substr">
|
||||
<refentry xml:id="function.substr" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>substr</refname>
|
||||
<refpurpose>Return part of a string</refpurpose>
|
||||
|
@ -9,14 +9,14 @@
|
|||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type class="union"><type>string</type><type>false</type></type><methodname>substr</methodname>
|
||||
<type>string</type><methodname>substr</methodname>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>start</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>length</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>offset</parameter></methodparam>
|
||||
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the portion of <parameter>string</parameter> specified by the
|
||||
<parameter>start</parameter> and <parameter>length</parameter> parameters.
|
||||
<parameter>offset</parameter> and <parameter>length</parameter> parameters.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -33,11 +33,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>start</parameter></term>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>start</parameter> is non-negative, the returned string
|
||||
will start at the <parameter>start</parameter>'th position in
|
||||
If <parameter>offset</parameter> is non-negative, the returned string
|
||||
will start at the <parameter>offset</parameter>'th position in
|
||||
<parameter>string</parameter>, counting from zero. For instance,
|
||||
in the string '<literal>abcdef</literal>', the character at
|
||||
position <literal>0</literal> is '<literal>a</literal>', the
|
||||
|
@ -45,17 +45,17 @@
|
|||
'<literal>c</literal>', and so forth.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>start</parameter> is negative, the returned string
|
||||
will start at the <parameter>start</parameter>'th character
|
||||
If <parameter>offset</parameter> is negative, the returned string
|
||||
will start at the <parameter>offset</parameter>'th character
|
||||
from the end of <parameter>string</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>string</parameter> is less than
|
||||
<parameter>start</parameter> characters long, &false; will be returned.
|
||||
<parameter>offset</parameter> characters long, &false; will be returned.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using a negative <parameter>start</parameter></title>
|
||||
<title>Using a negative <parameter>offset</parameter></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -75,15 +75,15 @@ $rest = substr("abcdef", -3, 1); // returns "d"
|
|||
<para>
|
||||
If <parameter>length</parameter> is given and is positive, the string
|
||||
returned will contain at most <parameter>length</parameter> characters
|
||||
beginning from <parameter>start</parameter> (depending on the length of
|
||||
beginning from <parameter>offset</parameter> (depending on the length of
|
||||
<parameter>string</parameter>).
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>length</parameter> is given and is negative, then that many
|
||||
characters will be omitted from the end of <parameter>string</parameter>
|
||||
(after the start position has been calculated when a
|
||||
<parameter>start</parameter> is negative). If
|
||||
<parameter>start</parameter> denotes the position of this truncation or
|
||||
<parameter>offset</parameter> is negative). If
|
||||
<parameter>offset</parameter> denotes the position of this truncation or
|
||||
beyond, &false; will be returned.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -92,7 +92,7 @@ $rest = substr("abcdef", -3, 1); // returns "d"
|
|||
</para>
|
||||
<para>
|
||||
If <parameter>length</parameter> is omitted, the substring starting from
|
||||
<parameter>start</parameter> until the end of the string will be
|
||||
<parameter>offset</parameter> until the end of the string will be
|
||||
returned.
|
||||
</para>
|
||||
<example>
|
||||
|
@ -122,6 +122,34 @@ $rest = substr("abcdef", -3, -1); // returns "de"
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
<parameter>length</parameter> is nullable now.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
The function returns an empty where it previously returned &false;.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
@ -228,7 +256,6 @@ var_dump(substr('a', 2)); // bool(false)
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.trim">
|
||||
<refentry xml:id="function.trim" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>trim</refname>
|
||||
<refpurpose>Strip whitespace (or other characters) from the beginning and end of a string</refpurpose>
|
||||
|
@ -11,12 +11,12 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>trim</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>character_mask</parameter><initializer>" \t\n\r\0\x0B"</initializer></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\0"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a string with whitespace stripped from the
|
||||
beginning and end of <parameter>str</parameter>.
|
||||
beginning and end of <parameter>string</parameter>.
|
||||
Without the second parameter,
|
||||
<function>trim</function> will strip these characters:
|
||||
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
|
||||
|
@ -66,7 +66,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <type>string</type> that will be trimmed.
|
||||
|
@ -74,11 +74,11 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>character_mask</parameter></term>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally, the stripped characters can also be specified using
|
||||
the <parameter>character_mask</parameter> parameter.
|
||||
the <parameter>characters</parameter> parameter.
|
||||
Simply list all characters that you want to be stripped. With
|
||||
<literal>..</literal> you can specify a range of characters.
|
||||
</para>
|
||||
|
@ -219,7 +219,6 @@ array(3) {
|
|||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ucfirst">
|
||||
<refentry xml:id="function.ucfirst" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>ucfirst</refname>
|
||||
<refpurpose>Make a string's first character uppercase</refpurpose>
|
||||
|
@ -10,11 +10,11 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ucfirst</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string with the first character of
|
||||
<parameter>str</parameter> capitalized, if that character is
|
||||
<parameter>string</parameter> capitalized, if that character is
|
||||
alphabetic.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -81,7 +81,6 @@ $bar = ucfirst(strtolower($bar)); // Hello world!
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ucwords">
|
||||
<refentry xml:id="function.ucwords" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>ucwords</refname>
|
||||
<refpurpose>Uppercase the first character of each word in a string</refpurpose>
|
||||
|
@ -10,18 +10,16 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>ucwords</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam choice="opt">
|
||||
<type>string</type><parameter>delimiters</parameter><initializer>" \t\r\n\f\v"</initializer>
|
||||
</methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>separators</parameter><initializer>" \t\r\n\f\v"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string with the first character of each word in
|
||||
<parameter>str</parameter> capitalized, if that character is alphabetic.
|
||||
<parameter>string</parameter> capitalized, if that character is alphabetic.
|
||||
</para>
|
||||
<para>
|
||||
The definition of a word is any string of characters that is immediately
|
||||
after any character listed in the <parameter>delimiters</parameter> parameter
|
||||
after any character listed in the <parameter>separators</parameter> parameter
|
||||
(By default these are: space, form-feed, newline, carriage return, horizontal tab, and vertical tab).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -31,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -39,10 +37,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>delimiters</parameter></term>
|
||||
<term><parameter>separators</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The optional <parameter>delimiters</parameter> contains the word separator characters.
|
||||
The optional <parameter>separators</parameter> contains the word separator characters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -129,7 +127,6 @@ $baz = ucwords($foo, " \t\r\n\f\v'"); // Mike O'Hara
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.vfprintf">
|
||||
<refentry xml:id="function.vfprintf" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>vfprintf</refname>
|
||||
<refpurpose>Write a formatted string to a stream</refpurpose>
|
||||
|
@ -10,13 +10,13 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>vfprintf</methodname>
|
||||
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>format</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>args</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>values</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Write a string produced according to <parameter>format</parameter> to the
|
||||
stream resource specified by <parameter>handle</parameter>.
|
||||
stream resource specified by <parameter>stream</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Operates as <function>fprintf</function> but accepts an array of
|
||||
|
@ -29,7 +29,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>handle</parameter></term>
|
||||
<term><parameter>stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</varlistentry>
|
||||
&strings.parameter.format;
|
||||
<varlistentry>
|
||||
<term><parameter>args</parameter></term>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
|
@ -92,7 +92,6 @@ vfprintf($fp, "%04d-%02d-%02d", array($year, $month, $day));
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.vprintf">
|
||||
<refentry xml:id="function.vprintf" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>vprintf</refname>
|
||||
<refpurpose>Output a formatted string</refpurpose>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<methodsynopsis>
|
||||
<type>int</type><methodname>vprintf</methodname>
|
||||
<methodparam><type>string</type><parameter>format</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>args</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>values</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Display array values as a formatted string according to
|
||||
|
@ -30,7 +30,7 @@
|
|||
<variablelist>
|
||||
&strings.parameter.format;
|
||||
<varlistentry>
|
||||
<term><parameter>args</parameter></term>
|
||||
<term><parameter>values</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
|
@ -87,7 +87,6 @@ vprintf("%04d-%02d-%02d", explode('-', '1988-8-1'));
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.wordwrap">
|
||||
<refentry xml:id="function.wordwrap" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>wordwrap</refname>
|
||||
<refpurpose>Wraps a string to a given number of characters</refpurpose>
|
||||
|
@ -10,10 +10,10 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>wordwrap</methodname>
|
||||
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>width</parameter><initializer>75</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>break</parameter><initializer>"\n"</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>cut</parameter><initializer>&false;</initializer></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>cut_long_words</parameter><initializer>&false;</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Wraps a string to a given number of characters using a string break
|
||||
|
@ -26,7 +26,7 @@
|
|||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>str</parameter></term>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
|
@ -51,10 +51,10 @@
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>cut</parameter></term>
|
||||
<term><parameter>cut_long_words</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the <parameter>cut</parameter> is set to &true;, the string is
|
||||
If the <parameter>cut_long_words</parameter> is set to &true;, the string is
|
||||
always wrapped at or before the specified <parameter>width</parameter>. So if you have
|
||||
a word that is larger than the given width, it is broken apart.
|
||||
(See second example). When &false; the function does not split the word
|
||||
|
@ -156,7 +156,6 @@ something
|
|||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
Loading…
Reference in a new issue