fcc4ad9fc24764ea6285a4824477ac0749c4b970
[scilab.git] / scilab / modules / string / help / en_US / justify.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) INRIA -
5 *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14 *
15 -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
17           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
18           xmlns:db="http://docbook.org/ns/docbook" xml:lang="en" xml:id="justify">
19     <refnamediv>
20         <refname>justify</refname>
21         <refpurpose>aligns texts in columns to the left, center, or right</refpurpose>
22     </refnamediv>
23     <refsynopsisdiv>
24         <title>Syntax</title>
25         <synopsis>Tj = justify(T, position)</synopsis>
26     </refsynopsisdiv>
27     <refsection>
28         <title>Arguments</title>
29         <variablelist>
30             <varlistentry>
31                 <term>T</term>
32                 <listitem>
33                     <para>a matrix of character strings.</para>
34                 </listitem>
35             </varlistentry>
36             <varlistentry>
37                 <term>Tj</term>
38                 <listitem>
39                     <para>
40                         a matrix of character strings. The justified result.
41                     </para>
42                 </listitem>
43             </varlistentry>
44             <varlistentry>
45                 <term>position</term>
46                 <listitem>
47                     <para>
48                         Possible values:
49                         <table cellspacing="0" cellpadding="0">
50                           <tr><td><term>'l' or 'left'</term></td><td>: left justification</td></tr>
51                           <tr><td><term>'c' or 'center'</term></td><td>: centering</td></tr>
52                           <tr><td><term>'r' or 'right'</term></td><td>: right justification</td></tr>
53                         </table>
54                     </para>
55                 </listitem>
56             </varlistentry>
57         </variablelist>
58     </refsection>
59     <refsection>
60         <title>Description</title>
61         <para>
62             The <function>justify</function> function justifies the column of a
63             matrix of string according to the given <varname>position</varname>.
64         </para>
65     </refsection>
66     <refsection>
67         <title>Examples</title>
68         <programlisting role="example"><![CDATA[
69 t=['1234','x','adfdfgdfghfgj'
70    '1','354556','dgf'
71    'sdfgd','','sdfsf'];
72
73 justify(t,'l')
74 justify(t,'c')
75 justify(t,'r')
76     ]]></programlisting>
77     </refsection>
78     <refsection role="see also">
79         <title>See also</title>
80         <simplelist type="inline">
81             <member>
82                 <link linkend="length">length</link>
83             </member>
84             <member>
85                 <link linkend="part">part</link>
86             </member>
87         </simplelist>
88     </refsection>
89 </refentry>