Remove all the authors from the documentation. This has been done for the following...
[scilab.git] / scilab / modules / string / help / en_US / part.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  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="part" xml:lang="en">
14   <info>
15     <pubdate>$LastChangedDate: 2006-08-08 16:57:13 +0200 (Tue, 08 Aug 2006)
16       $
17     </pubdate>
18   </info>
19   <refnamediv>
20     <refname>part</refname>
21     <refpurpose>extraction of strings</refpurpose>
22   </refnamediv>
23   <refsynopsisdiv>
24     <title>Calling Sequence</title>
25     <synopsis>[strings_out] = part(strings_in, v)</synopsis>
26   </refsynopsisdiv>
27   <refsection>
28     <title>Arguments</title>
29     <variablelist>
30       <varlistentry>
31         <term>strings_in, strings_out</term>
32         <listitem>
33           <para>Matrix of character strings.</para>
34         </listitem>
35       </varlistentry>
36       <varlistentry>
37         <term>v</term>
38         <listitem>
39           <para>Integer row vector.</para>
40         </listitem>
41       </varlistentry>
42     </variablelist>
43   </refsection>
44   <refsection>
45     <title>Description</title>
46     <para>
47       Let <literal>s[k]</literal> stands for the <literal>k</literal>
48       character of string <literal>s</literal> ( or the white space character if
49       <literal>k &gt;length(s)</literal>).
50     </para>
51     <para>
52       <literal>part</literal> returns <literal>strings_out</literal>, a
53       matrix of character strings, such that <literal>strings_out(i,j)</literal>
54       is the string <literal>"s[v(1)]...s[v(n)]"</literal> (
55       <literal>s=strings_in(i,j)</literal> ).
56     </para>
57   </refsection>
58   <refsection>
59     <title>Examples</title>
60     <programlisting role="example"><![CDATA[ 
61 // returns characters position 8 to 11
62 part("How to use ""part"" ?",8:11)
63
64 // returns characters position 2 to 4 for each element
65 // no characters replaced by ''
66 c = part(['a','abc','abcd'],2:4)
67
68 // returns character position 1 for each element and add characters position 4 to 7 of each element
69 c = part(['abcdefg','hijklmn','opqrstu'],[1,4:7]);
70
71 // returns character 4 for each element, add characters position 1 to 7 and add character position 4 for each element
72 c = part(['abcdefg','hijklmn','opqrstu'],[4,1:7,4]);
73
74 // returns character position 1,add again character position 1 and character position 2
75 c=part(['a','abc','abcd'],[1,1,2])
76
77 // a a a  
78 part(['a','abc','abcd'],[1])
79
80 // aa aa aa 
81 part(['a','abc','abcd'],[1,1])
82
83 // aa aab aab 
84 part(['a','abc','abcd'],[1,1,2])
85  ]]></programlisting>
86   </refsection>
87   <refsection role="see also">
88     <title>See Also</title>
89     <simplelist type="inline">
90       <member>
91         <link linkend="string">string</link>
92       </member>
93       <member>
94         <link linkend="length">length</link>
95       </member>
96     </simplelist>
97   </refsection>
98 </refentry>