/usr/share/mozart/doc/base/string.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>7.2 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="char.html#section.text.characters"><< Prev</A></TD><TD><A href="node9.html">- Up -</A></TD><TD><A href="bytestring.html#section.text.bytestrings">Next >></A></TD></TR></TABLE><DIV id="section.text.strings"><H2><A name="section.text.strings">7.2 Strings</A></H2><P> The module <A name="label412"></A><SPAN class="index"><CODE>String</CODE></SPAN> contains procedures operating on strings. Strings are lists whose elements are characters (see <A href="char.html#section.text.characters">Section 7.1</A>). </P><DL><DT><A name="label413"></A><SPAN class="index"><CODE>IsString</CODE></SPAN> <A name="label415"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>is </CODE><CODE>+<I>X</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether <CODE><I>X</I></CODE> is string. </P></DD><DT><A name="label416"></A><SPAN class="index"><CODE>StringToAtom</CODE></SPAN> <A name="label418"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>toAtom </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE>?<I>A</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>converts a string <CODE><I>S</I></CODE> to an atom <CODE><I>A</I></CODE>. <CODE><I>S</I></CODE> must not contain NUL characters. This is the inverse of <CODE>Atom<SPAN class="keyword">.</SPAN>toString</CODE> (which see). </P></DD><DT><CODE>isAtom</CODE> <A name="label420"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>isAtom </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether the string <CODE><I>S</I></CODE> can be converted to an atom. </P></DD><DT><A name="label421"></A><SPAN class="index"><CODE>StringToInt</CODE></SPAN> <A name="label423"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>toInt </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE>?<I>I</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>converts a string <CODE><I>S</I></CODE> to an integer <CODE><I>I</I></CODE>, according to Oz concrete syntax. See also <CODE>IntToString</CODE>. </P></DD><DT><CODE>isInt</CODE> <A name="label425"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>isInt </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether the string <CODE><I>S</I></CODE> can be converted to an integer. </P></DD><DT><A name="label426"></A><SPAN class="index"><CODE>StringToFloat</CODE></SPAN> <A name="label428"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>toFloat </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE>?<I>F</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>converts a string <CODE><I>S</I></CODE> to a float <CODE><I>F</I></CODE>, according to Oz concrete syntax. See also <CODE>FloatToString</CODE>. </P></DD><DT><CODE>isFloat</CODE> <A name="label430"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>isFloat </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE>?<I>B</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>tests whether the string <CODE><I>S</I></CODE> can be converted to a float. </P></DD><DT><CODE>token</CODE> <A name="label432"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>token </CODE><CODE>+<I>S1</I></CODE><CODE> </CODE><CODE><I>X</I></CODE><CODE> </CODE><CODE>?<I>S2</I></CODE><CODE> </CODE><CODE>?<I>S3</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>splits the string <CODE><I>S1</I></CODE> into two substrings <CODE><I>S2</I></CODE> and <CODE><I>S3</I></CODE>. <CODE><I>S2</I></CODE> will contain all characters before the first occurence of <CODE><I>X</I></CODE>, <CODE><I>S3</I></CODE> all remaining characters with <CODE><I>X</I></CODE> excluded. If <CODE><I>X</I></CODE> does not occur in <CODE><I>S1</I></CODE>, then <CODE><I>S2</I></CODE> will be equal to <CODE><I>S1</I></CODE> and <CODE><I>S3</I></CODE> will be the empty string. </P><P> For example, </P><BLOCKQUOTE class="code"><CODE>{String<SPAN class="keyword">.</SPAN>token <SPAN class="string">"a:b:c"</SPAN> <SPAN class="string">&:</SPAN> S1 S2}</CODE></BLOCKQUOTE><P> binds <CODE>S1</CODE> to <CODE><SPAN class="string">"a"</SPAN></CODE> and <CODE>S2</CODE> to <CODE><SPAN class="string">"b:c"</SPAN></CODE>. </P></DD><DT><CODE>tokens</CODE> <A name="label434"></A> </DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>{String<SPAN class="keyword">.</SPAN>tokens </CODE><CODE>+<I>S</I></CODE><CODE> </CODE><CODE><I>X</I></CODE><CODE> </CODE><CODE>?<I>Ss</I></CODE><CODE>}</CODE> </P></BLOCKQUOTE></DD><DD><P>splits the string <CODE><I>S</I></CODE> into substrings <CODE><I>Ss</I></CODE> delimited by occurrences of <CODE><I>X</I></CODE> in <CODE><I>S</I></CODE>. Note that the final empty string will be omitted if the last element of <CODE><I>S</I></CODE> is an <CODE><I>X</I></CODE>. </P><P> For example, </P><BLOCKQUOTE class="code"><CODE>{String<SPAN class="keyword">.</SPAN>tokens <SPAN class="string">"a:bb:cc:d:"</SPAN> <SPAN class="string">&:</SPAN>}</CODE></BLOCKQUOTE><P> returns <CODE>[<SPAN class="string">"a"</SPAN> <SPAN class="string">"bb"</SPAN> <SPAN class="string">"cc"</SPAN> <SPAN class="string">"d"</SPAN>]</CODE>. </P></DD></DL><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="char.html#section.text.characters"><< Prev</A></TD><TD><A href="node9.html">- Up -</A></TD><TD><A href="bytestring.html#section.text.bytestrings">Next >></A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif Kornstaedt</A> and <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>
|