svn: /phpdoc/es/trunk/reference/strings/functions/ str-word-count.xml

From: Date: Fri, 10 Dec 2010 02:40:51 +0000
Subject: svn: /phpdoc/es/trunk/reference/strings/functions/ str-word-count.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-3923@lists.php.net to get a copy of this message
jpberdejo Fri, 10 Dec 2010 02:40:51 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306164 Log: New translated file Changed paths: A phpdoc/es/trunk/reference/strings/functions/str-word-count.xml Added: phpdoc/es/trunk/reference/strings/functions/str-word-count.xml =================================================================== --- phpdoc/es/trunk/reference/strings/functions/str-word-count.xml (rev 0) +++ phpdoc/es/trunk/reference/strings/functions/str-word-count.xml 2010-12-10 02:40:51 UTC (rev 306164) @@ -0,0 +1,217 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- $Revision$ --> +<!-- EN-Revision: 288721 Maintainer: jpberdejo Status: ready --> +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-word-count"> + <refnamediv> + <refname>str_word_count</refname> + <refpurpose> + Devuelve información sobre las palabras utilizadas en un string + </refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>mixed</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> + </methodsynopsis> + <para> + Cuenta el número de palabras dentro de <parameter>string</parameter>. + Si no se especifica el <parameter>format</parameter> opcional, entonces + el valor devuelto será un integer representando el número de palabras + encontradas. En el caso en que se especifique <parameter>format</parameter>, el valor + devuelto será un array cuyo contenido depende de + <parameter>format</parameter>. Los posibles valores para + <parameter>format</parameter> y las salidas resultantes están listadas más abajo. + </para> + <para> + Para los propósitos de esta función, 'palabra' se define como un string dependiente + de la configuración regional que contiene caracteres alfabéticos, el cual también puede contener, pero no iniciar + con los caracteres &quot;'&quot; y &quot;-&quot;. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>string</parameter></term> + <listitem> + <para> + El string + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>format</parameter></term> + <listitem> + <para> + Especifica el valor devuelto de esta función. Los valores soportados actualmente + son: + <itemizedlist> + <listitem> + <simpara> + 0 - devuelve el número de palabras encontradas + </simpara> + </listitem> + <listitem> + <simpara> + 1 - devuelve un array que contiene todas las palabras encontradas dentro del + <parameter>string</parameter> + </simpara> + </listitem> + <listitem> + <simpara> + 2 - devuelve un array asociativo, donde la clave es la posición + numérica de una palabra dentro del <parameter>string</parameter> y + el valor es la palabra en sí. + </simpara> + </listitem> + </itemizedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>charlist</parameter></term> + <listitem> + <para> + Una lista de caracteres adicionales los cuales serán considerados como de 'palabra'. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Devuelve un array o un integer, dependiendo del + <parameter>format</parameter> seleccionado. + </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>5.1.0</entry> + <entry> + Agregado el parámetro <parameter>charlist</parameter> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Ejemplo de <function>str_word_count</function></title> + <programlisting role="php"> +<![CDATA[ +<?php + +$str = "Hello fri3nd, you're + looking good today!"; + +print_r(str_word_count($str, 1)); +print_r(str_word_count($str, 2)); +print_r(str_word_count($str, 1, 'àáãç3')); + +echo str_word_count($str); + +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Array +( + [0] => Hello + [1] => fri + [2] => nd + [3] => you're + [4] => looking + [5] => good + [6] => today +) + +Array +( + [0] => Hello + [6] => fri + [10] => nd + [14] => you're + [29] => looking + [46] => good + [51] => today +) + +Array +( + [0] => Hello + [1] => fri3nd + [2] => you're + [3] => looking + [4] => good + [5] => today +) + +7 +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>explode</function></member> + <member><function>preg_split</function></member> + <member><function>split</function></member> + <member><function>count_chars</function></member> + <member><function>substr_count</function></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 +--> + Property changes on: phpdoc/es/trunk/reference/strings/functions/str-word-count.xml ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native

« previous php.doc.es (#3923) next »