/usr/share/mozart/doc/op/node3.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>2.1 Strings</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html">- Up -</A></TD><TD><A href="node4.html#section.data.virtualstrings">Next >></A></TD></TR></TABLE><DIV id="section.data.strings"><H2><A name="section.data.strings">2.1 Strings</A></H2><P> Strings are lists of characters, with characters being small integers between 0 and 255. For the coding of characters with integers we use the ISO 8859-1 standard <A href="bib.html#iso_8859_1">[ISO87]</A>. </P><P> There are special operations on strings, like testing whether a given value <CODE>X</CODE> is a string, by <CODE>{IsString X}</CODE><A name="label12"></A>. For transforming strings into atoms, integers, or floats the procedures </P><UL><LI><P><CODE>String<SPAN class="keyword">.</SPAN>toAtom</CODE><A name="label14"></A>, </P></LI><LI><P><CODE>String<SPAN class="keyword">.</SPAN>toInt</CODE><A name="label16"></A>, and </P></LI><LI><P><CODE>String<SPAN class="keyword">.</SPAN>toFloat</CODE><A name="label18"></A> </P></LI></UL><P> are provided. For testing whether a given string can be transformed into an atom, integer, or float, the procedures </P><UL><LI><P><CODE>String<SPAN class="keyword">.</SPAN>isAtom</CODE><A name="label20"></A>, </P></LI><LI><P><CODE>String<SPAN class="keyword">.</SPAN>isInt</CODE><A name="label22"></A>, and </P></LI><LI><P><CODE>String<SPAN class="keyword">.</SPAN>isFloat</CODE><A name="label24"></A> </P></LI></UL><P> are provided. </P><P> In addition, all functionality provided by the module <A name="label25"></A><SPAN class="index"><CODE>List</CODE></SPAN> is applicable. It is especially useful in combination with the functionality provided by the module <A name="label26"></A><SPAN class="index"><CODE>Char</CODE></SPAN>. </P><P> Suppose that after reading or receiving a string <CODE>S=<SPAN class="string">"C@l!3E4aN#61!"</SPAN></CODE> all characters which are neither uppercase nor lowercase letters must be filtered out. This is achieved by using a combination of <A name="label27"></A><SPAN class="index"><CODE>Filter</CODE></SPAN> and <CODE>Char<SPAN class="keyword">.</SPAN>isAlpha</CODE><A name="label29"></A>. Feeding: </P><DL class="anoymous"><DT><SPAN class="chunktitle"><SPAN class="chunkborder"><</SPAN><A name="label30">{Filter S}</A><SPAN class="chunkborder">>=</SPAN></SPAN></DT><DD class="code"><CODE>{Browse {String<SPAN class="keyword">.</SPAN>toAtom {Filter S Char<SPAN class="keyword">.</SPAN>isAlpha}}}</CODE></DD></DL><P> will show the cleaned information in the browser window. </P><P> Instead of creating an atom from the cleaned string, the browser offers functionality to display strings directly in a convenient form. The functionality can be selected in the <SPAN class="menu">Representation, Type</SPAN> option, see also <A href="../browser/index.html">``The Oz Browser''</A>. For Example, </P><DL class="anoymous"><DT><SPAN class="chunktitle"><SPAN class="chunkborder"><</SPAN><A name="label31">{Browse S}</A><SPAN class="chunkborder">>=</SPAN></SPAN></DT><DD class="code"><CODE>{Browse {Filter S Char<SPAN class="keyword">.</SPAN>isAlpha}}</CODE></DD></DL><P> displays in the browser window the character sequence <CODE><SPAN class="string">"ClEaN"</SPAN></CODE>. </P><P> Remember that character codes for letters are syntactically supported. For instance, the string </P><BLOCKQUOTE class="code"><CODE><SPAN class="string">"hi there"</SPAN></CODE></BLOCKQUOTE><P> can be written equivalently as </P><BLOCKQUOTE class="code"><CODE>[<SPAN class="string">&h</SPAN> <SPAN class="string">&i</SPAN> <SPAN class="string">& </SPAN> <SPAN class="string">&t</SPAN> <SPAN class="string">&h</SPAN> <SPAN class="string">&e</SPAN> <SPAN class="string">&r</SPAN> <SPAN class="string">&e</SPAN>]</CODE></BLOCKQUOTE><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node2.html">- Up -</A></TD><TD><A href="node4.html#section.data.virtualstrings">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~schulte/">Christian Schulte</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|