add grapheme skeletons

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257012 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Stanislav Malyshev 2008-04-09 06:36:49 +00:00
parent 3f2cc4fc18
commit ae52561529
10 changed files with 1091 additions and 0 deletions

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-extract" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_extract</refname>
<refpurpose>Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>string</type><methodname>grapheme_extract</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>int</type><parameter>size</parameter></methodparam>
<methodparam choice='opt'><type>int</type><parameter>start</parameter></methodparam>
</methodsynopsis>
<para>
Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
string to search
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>size</parameter></term>
<listitem>
<para>
maximum number of grapheme clusters to return
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>start</parameter></term>
<listitem>
<para>
starting position in $haystack in bytes
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A string starting at offset $start containing no more than $size grapheme clusters and ending on a default grapheme cluster boundary.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_extract</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-extractb" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_extractb</refname>
<refpurpose>Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>string</type><methodname>grapheme_extractb</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>int</type><parameter>bsize</parameter></methodparam>
<methodparam choice='opt'><type>int</type><parameter>start</parameter></methodparam>
</methodsynopsis>
<para>
Function to extract a sequence of default grapheme clusters from a text buffer, which must be encoded in UTF-8.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
string to search
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>bsize</parameter></term>
<listitem>
<para>
maximum number of bytes to return
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>start</parameter></term>
<listitem>
<para>
starting position in $haystack in bytes
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A string starting at offset $start containing no more than $bsize bytes and ending on a default grapheme cluster boundary.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_extractb</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-stripos" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_stripos</refname>
<refpurpose>Find position (in grapheme units) of first occurrence of a case-insensitive string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>int</type><methodname>grapheme_stripos</methodname>
<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></methodparam>
</methodsynopsis>
<para>
Find position (in grapheme units) of first occurrence of a case-insensitive string
which character in haystack to start searching. The position
returned is still relative to the beginning of haystack.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
The string to look in
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>needle</parameter></term>
<listitem>
<para>
The string to look for
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>offset</parameter></term>
<listitem>
<para>
The optional offset parameter allows you to specify
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the position as an integer. If needle is not found, grapheme_stripos() will return boolean FALSE.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_stripos</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-stristr" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_stristr</refname>
<refpurpose>Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack.</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>string</type><methodname>grapheme_stristr</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
<methodparam choice='opt'><type>boolean</type><parameter>before_needle</parameter></methodparam>
</methodsynopsis>
<para>
Returns part of haystack string from the first occurrence of case-insensitive needle to the end of haystack.
haystack before the first occurence of the needle.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
The input string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>needle</parameter></term>
<listitem>
<para>
The string to look for.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>before_needle</parameter></term>
<listitem>
<para>
If TRUE (the default is FALSE), grapheme_strstr() returns the part of the
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the portion of string, or FALSE if needle is not found.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_stristr</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-strlen" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_strlen</refname>
<refpurpose>Get string length in grapheme units</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>int</type><methodname>grapheme_strlen</methodname>
<methodparam><type>string</type><parameter>input</parameter></methodparam>
</methodsynopsis>
<para>
Get string length in grapheme units
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>input</parameter></term>
<listitem>
<para>
The string being measured for length.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The length of the string on success, and 0 if the string is empty.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_strlen</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-strpos" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_strpos</refname>
<refpurpose>Find position (in grapheme units) of first occurrence of a string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>int</type><methodname>grapheme_strpos</methodname>
<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></methodparam>
</methodsynopsis>
<para>
Find position (in grapheme units) of first occurrence of a string
which character in haystack to start searching. The position
returned is still relative to the beginning of haystack.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
The string to look in
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>needle</parameter></term>
<listitem>
<para>
The string to look for
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>offset</parameter></term>
<listitem>
<para>
The optional offset parameter allows you to specify
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the position as an integer. If needle is not found, strpos() will return boolean FALSE.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_strpos</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-strripos" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_strripos</refname>
<refpurpose>Find position (in grapheme units) of last occurrence of a case-insensitive string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>int</type><methodname>grapheme_strripos</methodname>
<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></methodparam>
</methodsynopsis>
<para>
Find position (in grapheme units) of last occurrence of a case-insensitive string
which character in haystack to start searching. The position
returned is still relative to the beginning of haystack.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
The string to look in
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>needle</parameter></term>
<listitem>
<para>
The string to look for
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>offset</parameter></term>
<listitem>
<para>
The optional offset parameter allows you to specify
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the position as an integer. If needle is not found, grapheme_strripos() will return boolean FALSE.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_strripos</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-strrpos" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_strrpos</refname>
<refpurpose>Find position (in grapheme units) of last occurrence of a string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>int</type><methodname>grapheme_strrpos</methodname>
<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></methodparam>
</methodsynopsis>
<para>
Find position (in grapheme units) of last occurrence of a string
which character in haystack to start searching. The position
returned is still relative to the beginning of haystack.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
The string to look in
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>needle</parameter></term>
<listitem>
<para>
The string to look for
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>offset</parameter></term>
<listitem>
<para>
The optional offset parameter allows you to specify
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the position as an integer. If needle is not found, grapheme_strrpos() will return boolean FALSE.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_strrpos</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-strstr" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_strstr</refname>
<refpurpose>Returns part of haystack string from the first occurrence of needle to the end of haystack.</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>string</type><methodname>grapheme_strstr</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
<methodparam choice='opt'><type>boolean</type><parameter>before_needle</parameter></methodparam>
</methodsynopsis>
<para>
Returns part of haystack string from the first occurrence of needle to the end of haystack.
haystack before the first occurence of the needle.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>haystack</parameter></term>
<listitem>
<para>
The input string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>needle</parameter></term>
<listitem>
<para>
The string to look for.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>before_needle</parameter></term>
<listitem>
<para>
If TRUE (the default is FALSE), grapheme_strstr() returns the part of the
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the portion of string, or FALSE if needle is not found.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_strstr</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="function.grapheme-substr" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>grapheme_substr</refname>
<refpurpose>Return part of a string</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>Procedural style</para>
<methodsynopsis>
<type>int</type><methodname>grapheme_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>
</methodsynopsis>
<para>
Return part of a string
start'th position in string, counting from zero. If start is negative,
the returned string will start at the start'th character from the
end of string.
at most length characters beginning from start (depending on the
length of string). If string is less than or equal to start characters
long, FALSE will be returned. If length is given and is negative, then
that many characters will be omitted from the end of string (after the
start position has been calculated when a start is negative). If start
denotes a position beyond this truncation, an empty string will be returned.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<para>
The input string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>start</parameter></term>
<listitem>
<para>
If start is non-negative, the returned string will start at the
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>length</parameter></term>
<listitem>
<para>
If length is given and is positive, the string returned will contain
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the extracted part of string.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>grapheme_substr</function> example</title>
<programlisting role="php">
<![CDATA[
< ?php
TODO
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
TODO
]]>
</screen>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
TODO
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->