mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-24 17:02:18 +01:00
176 lines
4.5 KiB
XML
176 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 54ff7bf8e0f8fa90988cccf6b583517366605f6d Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.ucwords" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>ucwords</refname>
|
|
<refpurpose>Met en majuscule la première lettre de tous les mots</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>
|
|
Retourne la chaîne <parameter>string</parameter> après avoir mis en
|
|
majuscule la première lettre de tous les mots, si ce caractère est
|
|
un caractère ASCII entre <literal>"a"</literal> (0x61) et
|
|
<literal>"z"</literal> (0x7a).
|
|
</para>
|
|
<para>
|
|
Dans le contexte de cette fonction, un mot est toute séquence de caractères
|
|
qui ne sont pas listés dans le paramètre <parameter>separators</parameter>.
|
|
Par défaut, ce sont : une espace, un saut à la ligne, une nouvelle ligne,
|
|
un retour à la ligne, un saut de page, une tabulation horizontale et une tabulation verticale.
|
|
</para>
|
|
<para>
|
|
Pour faire une conversion similaire sur les chaînes multioctet, utilisez
|
|
<function>mb_convert_case</function> avec le mode
|
|
<constant>MB_CASE_TITLE</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>string</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La chaîne d'entrée.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>separators</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le paramètre optionnel <parameter>separators</parameter> contient le caractère
|
|
de séparation.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne la chaîne, après modification.
|
|
</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>Exemple avec <function>ucwords</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = 'bonjour tout le monde!';
|
|
$foo = ucwords($foo); // Bonjour Tout Le Monde!
|
|
|
|
$bar = 'BONJOUR TOUT LE MONDE!';
|
|
$bar = ucwords($bar); // BONJOUR TOUT LE MONDE!
|
|
$bar = ucwords(strtolower($bar)); // Bonjour Tout Le Monde!
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>ucwords</function> et un séparation personnalisé</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = 'hello|world!';
|
|
$bar = ucwords($foo); // Hello|world!
|
|
|
|
$baz = ucwords($foo, "|"); // Hello|World!
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
<para>
|
|
<example>
|
|
<title>Exemple de <function>ucwords</function> des séparateurs supplémentaires</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$foo = "mike o'hara";
|
|
$bar = ucwords($foo); // Mike O'hara
|
|
|
|
$baz = ucwords($foo, " \t\r\n\f\v'"); // 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
|
|
-->
|