mirror of
https://github.com/php/doc-es.git
synced 2026-04-27 00:58:15 +02:00
9f7804a633
* feat(translation): update revision EN * feat(translation): update revision EN
176 lines
4.6 KiB
XML
176 lines
4.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 45042fef652f1b4e904e809fcbfcf31f6c60670b Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.ucwords" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ucwords</refname>
|
|
<refpurpose>Pone en mayúscula la primera letra de todas las palabras</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>ucwords</methodname>
|
|
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>separators</parameter><initializer>" \t\r\n\f\v"</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Devuelve la cadena <parameter>string</parameter> después de poner en
|
|
mayúscula la primera letra de todas las palabras, si este carácter es
|
|
un carácter ASCII entre <literal>"a"</literal> (0x61) y
|
|
<literal>"z"</literal> (0x7a).
|
|
</para>
|
|
<para>
|
|
En el contexto de esta función, una palabra es cualquier secuencia de caracteres
|
|
que no están listados en el parámetro <parameter>separators</parameter>.
|
|
Por omisión, estos son: un espacio, un salto de línea, una nueva línea,
|
|
un retorno de carro, un salto de página, una tabulación horizontal y una tabulación vertical.
|
|
</para>
|
|
<para>
|
|
Para realizar una conversión similar en cadenas multiocteto, utilice
|
|
<function>mb_convert_case</function> con el modo
|
|
<constant>MB_CASE_TITLE</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>string</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La cadena de entrada.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>separators</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El parámetro opcional <parameter>separators</parameter> contiene el carácter
|
|
de separación.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve la cadena, después de la modificación.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
&strings.changelog.ascii-case-conversion;
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo con <function>ucwords</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = 'bonjour tout le monde!';
|
|
echo ucwords($foo), PHP_EOL; // Bonjour Tout Le Monde!
|
|
|
|
$bar = 'BONJOUR TOUT LE MONDE!';
|
|
echo ucwords($bar), PHP_EOL; // BONJOUR TOUT LE MONDE!
|
|
echo ucwords(strtolower($bar)), PHP_EOL; // Bonjour Tout Le Monde!
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo con <function>ucwords</function> y un separador personalizado</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = 'hello|world!';
|
|
echo ucwords($foo), PHP_EOL; // Hello|world!
|
|
|
|
echo ucwords($foo, "|"), PHP_EOL; // Hello|World!
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>ucwords</function> con separadores adicionales</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = "mike o'hara";
|
|
echo ucwords($foo), PHP_EOL; // Mike O'hara
|
|
|
|
echo ucwords($foo, " \t\r\n\f\v'"), PHP_EOL; // Mike O'Hara
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.bin-safe;
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>strtoupper</function></member>
|
|
<member><function>strtolower</function></member>
|
|
<member><function>ucfirst</function></member>
|
|
<member><function>mb_convert_case</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
|
|
-->
|