Files
doc-fr/reference/strings/functions/chr.xml
T
Damien Seguy b62d2b7602 typos and spelling
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@164657 c90b9560-bf6c-de11-be94-00142212c4b1
2004-07-29 17:04:44 +00:00

67 lines
1.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- EN-Revision: 1.4 Maintainer: didou Status: ready -->
<refentry id="function.chr">
<refnamediv>
<refname>chr</refname>
<refpurpose>Retourne un caractère spécifique</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>chr</methodname>
<methodparam><type>int</type><parameter>ascii</parameter></methodparam>
</methodsynopsis>
<para>
<methodname>chr</methodname> retourne une chaîne d'un seul caractère,
dont le code ASCII est donné par le paramètre <parameter>ascii</parameter>.
<example>
<title>Exemple avec <function>chr</function></title>
<programlisting role="php">
<![CDATA[
<?php
// Ajoute un caractère d'échappement à la fin de la chaîne $str
$str .= chr(27);
// Ceci est souvent plus pratique, et réalise la même chose
$str = sprintf("The string ends in escape: %c", 27);
?>
]]>
</programlisting>
</example>
</para>
<para>
Vous pouvez trouvez une table des codes ASCII ici :
<ulink url="&url.asciitable;">&url.asciitable;</ulink>.
</para>
<para>
Cette fonction est l'inverse de <function>ord</function>.
Voir aussi <function>sprintf</function>, et le caractère
de formatage <literal>%c</literal>.
</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
-->