Revert f56158b2 "[doc] string pages improved" for specific files where
[scilab.git] / scilab / modules / string / help / en_US / strcspn.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:ns4="http://www.w3.org/1999/xhtml"
18           xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
19           xml:id="strcspn" xml:lang="en">
20     <refnamediv>
21         <refname>strcspn</refname>
22         <refpurpose>
23             lengths from the beginning of strings until a character among those prohibited
24         </refpurpose>
25     </refnamediv>
26     <refsynopsisdiv>
27         <title>Syntax</title>
28         <synopsis>res = strcspn(string_one, string_two)</synopsis>
29     </refsynopsisdiv>
30     <refsection>
31         <title>Arguments</title>
32         <variablelist>
33             <varlistentry>
34                 <term>string_one</term>
35                 <listitem>
36                     <para>
37                         a character string or matrix of character strings.
38                     </para>
39                 </listitem>
40             </varlistentry>
41             <varlistentry>
42                 <term>string_two</term>
43                 <listitem>
44                     <para>
45                         a character string or matrix of character strings.
46                     </para>
47                 </listitem>
48             </varlistentry>
49             <varlistentry>
50                 <term>res</term>
51                 <listitem>
52                     <para>a matrix.</para>
53                 </listitem>
54             </varlistentry>
55         </variablelist>
56     </refsection>
57     <refsection>
58         <title>Description</title>
59         <para>
60             <code>res = strcspn(string_one,string_two)</code> scans
61             <varname>string_one</varname> for the first occurrence of any of the
62             characters that are part of <varname>string_two</varname>, returning
63             the number of characters of <varname>string_one</varname> read
64             before this first occurrence.
65         </para>
66         <para>
67             <varname>string_two</varname> must have same dimensions than <varname>string_one</varname> or <varname>string_two</varname>
68             must be a string.
69         </para>
70     </refsection>
71     <refsection>
72         <title>Examples</title>
73         <programlisting role="example"><![CDATA[
74 strcspn("fcba73","1234567890")
75 strcspn(["fcba73","f7cba73"],"1234567890")
76 strcspn(["fcba73","f7cba73"],["312","34567890"])
77  ]]></programlisting>
78     </refsection>
79     <refsection role="see also">
80         <title>See also</title>
81         <simplelist type="inline">
82             <member>
83                 <link linkend="strspn">strspn</link>
84             </member>
85         </simplelist>
86     </refsection>
87 </refentry>