2004-04-13 15:43:47 +00:00
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
|
|
<!-- $Revision$ -->
|
2004-05-23 15:50:53 +00:00
|
|
|
|
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
|
|
|
|
|
<sect1 id="language.function.textformat">
|
|
|
|
|
|
<title>textformat</title>
|
|
|
|
|
|
<informaltable frame="all">
|
|
|
|
|
|
<tgroup cols="5">
|
|
|
|
|
|
<colspec colname="param" align="center" />
|
|
|
|
|
|
<colspec colname="type" align="center" />
|
|
|
|
|
|
<colspec colname="required" align="center" />
|
|
|
|
|
|
<colspec colname="default" align="center" />
|
|
|
|
|
|
<colspec colname="desc" />
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>Nom attribut</entry>
|
|
|
|
|
|
<entry>Type</entry>
|
|
|
|
|
|
<entry>Requis</entry>
|
|
|
|
|
|
<entry>Defaut</entry>
|
|
|
|
|
|
<entry>Description</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>style</entry>
|
|
|
|
|
|
<entry>cha<EFBFBD>ne de caract<63>res</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>style pr<70>d<EFBFBD>fini</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>indent</entry>
|
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>0</emphasis></entry>
|
|
|
|
|
|
<entry>Taille de l'indentation pour chaque
|
|
|
|
|
|
ligne</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>indent_first</entry>
|
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>0</emphasis></entry>
|
|
|
|
|
|
<entry>Taille de l'indentation de la
|
|
|
|
|
|
premi<6D>re ligne</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>indent_char</entry>
|
|
|
|
|
|
<entry>cha<EFBFBD>ne de caract<63>res</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>(single space)</emphasis></entry>
|
|
|
|
|
|
<entry>Le caract<63>re (ou la cha<68>ne) <20> utiliser pour
|
|
|
|
|
|
indenter</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>wrap</entry>
|
|
|
|
|
|
<entry>number</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>80</emphasis></entry>
|
|
|
|
|
|
<entry>A combien de caract<63>res doit on ajuster chaque
|
|
|
|
|
|
ligne</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>wrap_char</entry>
|
|
|
|
|
|
<entry>cha<EFBFBD>ne de caract<63>res</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>\n</emphasis></entry>
|
|
|
|
|
|
<entry>Le caract<63>re (ou cha<68>ne de caract<63>res) avec lequel
|
|
|
|
|
|
terminer les lignes</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>wrap_cut</entry>
|
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>false</emphasis></entry>
|
|
|
|
|
|
<entry>Si true, wrap r<>duira les lignes au caract<63>re exact
|
|
|
|
|
|
au lieu d'ajuster <20> la fin d'un mot</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>assign</entry>
|
|
|
|
|
|
<entry>cha<EFBFBD>ne de caract<63>res</entry>
|
|
|
|
|
|
<entry>Non</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>Le nom de la variable PHP dans laquelle la
|
|
|
|
|
|
sortie sera assign<67>e</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</tgroup>
|
|
|
|
|
|
</informaltable>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
textformat est une fonction de bloc utilis<69>e pour formater du texte.
|
|
|
|
|
|
Elle nettoie la cha<68>ne de ses espaces et caract<63>res sp<73>ciaux, puis
|
|
|
|
|
|
formate les paragraphes en ajustant ces derniers <20> une certaine limite,
|
|
|
|
|
|
puis en indentant les lignes.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Vous pouvez soit utiliser un style pr<70>d<EFBFBD>fini, soit d<>finir explicitement
|
|
|
|
|
|
chaque attribut. Actuellement, seul le style pr<70>d<EFBFBD>fini "email" est
|
|
|
|
|
|
disponible.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>textformat</title>
|
2004-04-13 15:43:47 +00:00
|
|
|
|
<programlisting>
|
|
|
|
|
|
{textformat wrap=40}
|
|
|
|
|
|
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
|
|
SORTIE:
|
|
|
|
|
|
|
|
|
|
|
|
This is foo. This is foo. This is foo.
|
|
|
|
|
|
This is foo. This is foo. This is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo. bar foo bar foo
|
|
|
|
|
|
foo. bar foo bar foo foo. bar foo bar
|
|
|
|
|
|
foo foo. bar foo bar foo foo. bar foo
|
|
|
|
|
|
bar foo foo. bar foo bar foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{textformat wrap=40 indent=4}
|
|
|
|
|
|
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
|
|
SORTIE:
|
|
|
|
|
|
|
|
|
|
|
|
This is foo. This is foo. This is
|
|
|
|
|
|
foo. This is foo. This is foo. This
|
|
|
|
|
|
is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo. bar foo bar foo
|
|
|
|
|
|
foo. bar foo bar foo foo. bar foo
|
|
|
|
|
|
bar foo foo. bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo. bar foo bar
|
|
|
|
|
|
foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
{textformat wrap=40 indent=4 indent_first=4}
|
|
|
|
|
|
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
|
|
SORTIE:
|
|
|
|
|
|
|
|
|
|
|
|
This is foo. This is foo. This
|
|
|
|
|
|
is foo. This is foo. This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo. bar foo bar
|
|
|
|
|
|
foo foo. bar foo bar foo foo. bar
|
|
|
|
|
|
foo bar foo foo. bar foo bar foo
|
|
|
|
|
|
foo. bar foo bar foo foo. bar foo
|
|
|
|
|
|
bar foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
{textformat style="email"}
|
|
|
|
|
|
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
This is foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
bar foo bar foo foo.
|
|
|
|
|
|
|
|
|
|
|
|
{/textformat}
|
|
|
|
|
|
|
|
|
|
|
|
SORTIE:
|
|
|
|
|
|
|
|
|
|
|
|
This is foo. This is foo. This is foo. This is foo. This is foo. This is
|
|
|
|
|
|
foo.
|
|
|
|
|
|
|
|
|
|
|
|
This is bar.
|
|
|
|
|
|
|
|
|
|
|
|
bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo
|
|
|
|
|
|
bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo
|
|
|
|
|
|
foo.
|
|
|
|
|
|
|
|
|
|
|
|
</programlisting>
|
2004-05-23 15:50:53 +00:00
|
|
|
|
</example>
|
2004-04-13 15:43:47 +00:00
|
|
|
|
</sect1>
|
|
|
|
|
|
<!-- 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
|
2004-05-23 15:50:53 +00:00
|
|
|
|
-->
|