Revert f56158b2 "[doc] string pages improved" for specific files where
[scilab.git] / scilab / modules / string / help / en_US / isascii.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  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  * Copyright (C) 2020 - Samuel GOUGEON
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:db="http://docbook.org/ns/docbook"
18           xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="isascii">
19     <refnamediv>
20         <refname>isascii</refname>
21         <refpurpose>
22            Tests if every character of given strings is 7-bit US-ASCII
23         </refpurpose>
24     </refnamediv>
25     <refsynopsisdiv>
26         <title>Syntax</title>
27         <synopsis>res = isascii(str)</synopsis>
28     </refsynopsisdiv>
29     <refsection>
30         <title>Arguments</title>
31         <variablelist>
32             <varlistentry>
33                 <term>str</term>
34                 <listitem>
35                     <para>a character string or an array of integers.</para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>res</term>
40                 <listitem>
41                     <para>a boolean matrix.</para>
42                 </listitem>
43             </varlistentry>
44         </variablelist>
45     </refsection>
46     <refsection>
47         <title>Description</title>
48         <para>
49             <code>res = isascii(str)</code> returns <constant>%t</constant>
50             (TRUE) if entries of <varname>str</varname> are a 7-bit
51             US-ASCII character code between 0 and octal 0177 inclusive (or
52             entries of <varname>str</varname> are 7-bit US-ASCII characters).
53             Otherwise returns <constant>%f</constant> (FALSE).
54         </para>
55     </refsection>
56     <refsection>
57         <title>Examples</title>
58         <programlisting role="example"><![CDATA[
59 isascii("Señor")
60
61 nt = ascii("Señor")
62 isascii(nt)
63
64 t = "We know that γ² = 1/(1-β²)";
65 isascii(t)
66 part(t, find(~isascii(t)))
67      ]]></programlisting>
68         <screen><![CDATA[
69 --> isascii("Señor")
70  ans  =
71   T T F T T
72
73 --> nt = ascii("Señor")
74  nt  =
75    83.   101.   195.   177.   111.   114.
76
77 --> isascii(nt)
78  ans  =
79   T T F F T T
80
81
82 --> t = "We know that γ² = 1/(1-β²)";
83 --> isascii(t)
84  ans  =
85   T T T T T T T T T T T T T F F T T T T T T T T F F T
86
87 --> part(t, find(~isascii(t)))
88  ans  =
89   "γ²β²"
90 ]]></screen>
91     </refsection>
92     <refsection role="see also">
93         <title>See also</title>
94         <simplelist type="inline">
95             <member>
96                 <link linkend="ascii">ascii</link>
97             </member>
98             <member>
99                 <link linkend="isalphanum">isalphanum</link>
100             </member>
101             <member>
102                 <link linkend="isdigit">isdigit</link>
103             </member>
104             <member>
105                 <link linkend="isletter">isletter</link>
106             </member>
107             <member>
108                 <link linkend="isnum">isnum</link>
109             </member>
110         </simplelist>
111     </refsection>
112 </refentry>