cvs: phpdoc /en/reference/intl/functions grapheme-extract.xml grapheme-extractb.xml

From: Date: Thu, 08 May 2008 13:43:57 +0000
Subject: cvs: phpdoc /en/reference/intl/functions grapheme-extract.xml grapheme-extractb.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1610@lists.php.net to get a copy of this message
ebatutis Thu May 8 13:43:57 2008 UTC Removed files: /phpdoc/en/reference/intl/functions grapheme-extractb.xml Modified files: /phpdoc/en/reference/intl/functions grapheme-extract.xml Log: collapse extract variants into one function http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/intl/functions/grapheme-extract.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/intl/functions/grapheme-extract.xml diff -u phpdoc/en/reference/intl/functions/grapheme-extract.xml:1.2 phpdoc/en/reference/intl/functions/grapheme-extract.xml:1.3 --- phpdoc/en/reference/intl/functions/grapheme-extract.xml:1.2 Fri Apr 18 17:04:49 2008 +++ phpdoc/en/reference/intl/functions/grapheme-extract.xml Thu May 8 13:43:56 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <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> @@ -35,11 +35,29 @@ <term><parameter>size</parameter></term> <listitem> <para> - Maximum number of grapheme clusters to return. + Maximum number items - based on the $extract_type - to return. </para> </listitem> </varlistentry> <varlistentry> + <term><parameter>extract_type</parameter></term> + <listitem> + <para> + Defines the type of units referred to by the $size parameter: + </para> + <para> + <simplelist> + <member>GRAPHEME_EXTR_COUNT (default) - $size is the number of default + grapheme clusters to extract.</member> + <member>GRAPHEME_EXTR_MAXBYTES - $size is the maximum number of bytes + returned.</member> + <member>GRAPHEME_EXTR_MAXCHARS - $size is the maximum number of UTF-8 + characters returned.</member> + </simplelist> + </para> + </listitem> + </varlistentry> + <varlistentry> <term><parameter>start</parameter></term> <listitem> <para> @@ -58,7 +76,8 @@ <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. + A string starting at offset $start and ending on a default grapheme cluster + boundary that conforms to the $size and $extract_type specified. </para> </refsect1> @@ -73,7 +92,7 @@ $char_a_ring_nfd = "a\xCC\x8A"; // 'LATIN SMALL LETTER A WITH RING ABOVE' (U+00E5) normalization form "D" $char_o_diaeresis_nfd = "o\xCC\x88"; // 'LATIN SMALL LETTER O WITH DIAERESIS' (U+00F6) normalization form "D" -print urlencode(grapheme_extract( $char_a_ring_nfd . $char_o_diaeresis_nfd, 1, 2)); +print urlencode(grapheme_extract( $char_a_ring_nfd . $char_o_diaeresis_nfd, 1, GRAPHEME_EXTR_COUNT, 2)); ?> ]]> @@ -91,7 +110,6 @@ &reftitle.seealso; <para> <simplelist> - <member><function>grapheme_extractb</function></member> <member><function>grapheme_substr</function></member> <member> <link xlink:href="&uri.unicode.graphemes;">

« previous php.doc.cvs (#1610) next »