mirror of
https://github.com/php/doc-es.git
synced 2026-04-27 09:08:15 +02:00
5d6e89dae7
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@319578 c90b9560-bf6c-de11-be94-00142212c4b1
132 lines
3.8 KiB
XML
132 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
|
<refentry xml:id="function.ps-hyphenate" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ps_hyphenate</refname>
|
|
<refpurpose>Particionar silábicamente una palabra</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>ps_hyphenate</methodname>
|
|
<methodparam><type>resource</type><parameter>psdoc</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>text</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Particiona silábicamente la palabra proporcionada. <function>ps_hyphenate</function> evalúa el
|
|
valor "hyphenminchars" (establecido mediante la función <function>ps_set_value</function>) y
|
|
el parámetro "hyphendict" (establecido mediante la función <function>ps_set_parameter</function>).
|
|
"hyphendict" debe establecerse antes de llamar a esta función.
|
|
</para>
|
|
<para>
|
|
Esta función requiere que la categoría de configuración regional LC_CTYPE sea establecida correctamente.
|
|
Esto se realiza cuando la extensión se inicializa utilizando las variables
|
|
de entorno. Lea el manual de 'locale' de sistemas Unix para más información.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>psdoc</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El identificador de recursos del fichero postscript,
|
|
como el devuelto por la función <function>ps_new</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>text</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<parameter>text</parameter> no debería contener ningún carácter que no
|
|
sea una letra. Las posiciones posibles para las divisiones son devueltas en un array de
|
|
números enteros. Cada número es la posición del carácter de
|
|
<parameter>text</parameter> después del cual puede tomar lugar una partición silábica.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Un array de enteros indicando la posición de posibles divisiones del
|
|
texto &return.falseforfailure;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Particionar silábicamente un texto</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$palabra = "Koordinatensystem";
|
|
$doumento_ps = ps_new();
|
|
ps_set_parameter($doumento_ps, "hyphendict", "hyph_de.dic");
|
|
$guiones = ps_hyphenate($doumento_ps, $palabra);
|
|
for($i=0; $i<strlen($palabra); $i++) {
|
|
echo $palabra[$i];
|
|
if(in_array($i, $guiones))
|
|
echo "-";
|
|
}
|
|
ps_delete($doumento_ps);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
Ko-ordi-na-ten-sys-tem
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<!-- <member><function>ps_boot</function></member> -->
|
|
<member><function>ps_show_boxed</function></member>
|
|
<member>locale(1)</member>
|
|
</simplelist>
|
|
</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:"~/.phpdoc/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
|
|
-->
|
|
|