Files
doc-fr/reference/strings/functions/ucfirst.xml
Damien Seguy 936c50d095 some typos and spelling
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@164568 c90b9560-bf6c-de11-be94-00142212c4b1
2004-07-28 20:21:58 +00:00

69 lines
2.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<!-- EN-Revision: 1.3 Maintainer: dams Status: partial -->
<refentry id="function.ucfirst">
<refnamediv>
<refname>ucfirst</refname>
<refpurpose>Met le premier caractère en majuscule</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>ucfirst</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
<methodname>ucfirst</methodname> retourne la chaîne <parameter>str</parameter>
après avoir remplacé le premier caractère par sa majuscule, si le
premier caractère est alphabétique.
</para>
<para>
Notez que la notion d'"alphabétique" est déterminée par la configuration
de localisation. Cela signifie que pour la configuration par défaut
"C", les caractères tels que les voyelles accentuées (comme
<literal>é</literal>, <literal>è</literal> ou <literal>à</literal>)
ne seront pas convertis.
<example>
<title>Exemple avec <function>ucfirst</function></title>
<programlisting role="php">
<![CDATA[
$foo = 'bonjour tout le monde!';
$foo = ucfirst($foo); // Bonjour tout le monde!
$bar = 'BONJOUR TOUT LE MONDE!';
$bar = ucfirst($bar); // BONJOUR TOUT LE MONDE!
$bar = ucfirst(strtolower($bar)); // Bonjour tout le monde!
]]>
</programlisting>
</example>
</para>
<para>
Voir aussi
<function>strtolower</function>,
<function>strtoupper</function> et
<function>ucwords</function>.
</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:"../../../../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
-->