Revert f56158b2 "[doc] string pages improved" for specific files where
[scilab.git] / scilab / modules / string / help / en_US / strrchr.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" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="strrchr">
17     <refnamediv>
18         <refname>strrchr</refname>
19         <refpurpose>
20             find the last occurrence of a character in a string
21         </refpurpose>
22     </refnamediv>
23     <refsynopsisdiv>
24         <title>Syntax</title>
25         <synopsis>res = strrchr(str1, char)</synopsis>
26     </refsynopsisdiv>
27     <refsection>
28         <title>Arguments</title>
29         <variablelist>
30             <varlistentry>
31                 <term>str1</term>
32                 <listitem>
33                     <para>
34                         a character string or matrix of character strings.
35                     </para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>char</term>
40                 <listitem>
41                     <para>a character or matrix of characters.</para>
42                 </listitem>
43             </varlistentry>
44             <varlistentry>
45                 <term>res</term>
46                 <listitem>
47                     <para>
48                         a character string or matrix of character strings.
49                     </para>
50                 </listitem>
51             </varlistentry>
52         </variablelist>
53     </refsection>
54     <refsection>
55         <title>Description</title>
56         <para>
57             <code>res = strrchr(str1, char)</code> returns the last occurrence of character <varname>char</varname> in the string <varname>str1</varname>.
58         </para>
59         <para>
60             <varname>char</varname> must have same dimensions than
61             <varname>str1</varname> or only one character.
62         </para>
63     </refsection>
64     <refsection>
65         <title>Examples</title>
66         <programlisting role="example"><![CDATA[
67 strrchr('This is a sample string','s')
68 strrchr(['This is a sample string','in scilab'],'s')
69 strrchr(['This is a sample string','in scilab'],['s','a'])
70  ]]></programlisting>
71     </refsection>
72     <refsection role="see also">
73         <title>See also</title>
74         <simplelist type="inline">
75             <member>
76                 <link linkend="strchr">strchr</link>
77             </member>
78             <member>
79                 <link linkend="strstr">strstr</link>
80             </member>
81         </simplelist>
82     </refsection>
83 </refentry>