adding example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@169343 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2004-09-27 12:21:09 +00:00
parent 684843960d
commit e3d6824e23

View file

@ -1,32 +1,60 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/regex.xml, last change in rev 1.2 -->
<refentry id="function.spliti">
<refnamediv>
<refname>spliti</refname>
<refpurpose>
Split string into array by regular expression case insensitive
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>spliti</methodname>
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>limit</parameter></methodparam>
</methodsynopsis>
<para>
This function is identical to <function>split</function> except
that this ignores case distinction when matching alphabetic
characters.
</para>
<para>
See also <function>preg_split</function>, <function>split</function>,
<function>explode</function>, and <function>implode</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.spliti">
<refnamediv>
<refname>spliti</refname>
<refpurpose>
Split string into array by regular expression case insensitive
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>spliti</methodname>
<methodparam><type>string</type><parameter>pattern</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>limit</parameter></methodparam>
</methodsynopsis>
<para>
This function is identical to <function>split</function> except
that this ignores case distinction when matching alphabetic
characters.
</para>
<para>
This example split a string using 'a' as separator :
<example>
<title><function>spliti</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$string = "aBBBaCCCADDDaEEEaGGGA";
$chunks = spliti ("a", $string, 5);
print_r($chunks);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[0] =>
[1] => BBB
[2] => CCC
[3] => DDD
[4] => EEEaGGGA
)
]]>
</screen>
</example>
</para>
<para>
See also <function>preg_split</function>, <function>split</function>,
<function>explode</function>, and <function>implode</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml