Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c26795bf2cadf2405b1f961ea9bc2ba2 > files > 26

haskell-utf8-string-0.3.3-1mdv2009.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Data.String.UTF8</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Data-String-UTF8.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>utf8-string-0.3.3: Support for reading and writing UTF8 Strings</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Data.String.UTF8</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>Representation
</A
></DT
><DT
><A HREF="#2"
>Character based operations
</A
></DT
><DT
><A HREF="#3"
>Representation based operations
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
> (Num s, Ord s) =&gt; <A HREF="#t%3AUTF8Bytes"
>UTF8Bytes</A
> b s | b -&gt; s</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfromString"
>fromString</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; String -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtoString"
>toString</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AfromRep"
>fromRep</A
> ::  string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtoRep"
>toRep</A
> ::  <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Areplacement_char"
>replacement_char</A
> :: Char</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Auncons"
>uncons</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; Maybe (Char, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsplitAt"
>splitAt</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Atake"
>take</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adrop"
>drop</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aspan"
>span</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (Char -&gt; Bool) -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Abreak"
>break</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (Char -&gt; Bool) -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afoldl"
>foldl</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (a -&gt; Char -&gt; a) -&gt; a -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Afoldr"
>foldr</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (Char -&gt; a -&gt; a) -&gt; a -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Alength"
>length</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; index</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Alines"
>lines</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; [<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Alines%27"
>lines'</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; [<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Anull"
>null</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; Bool</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adecode"
>decode</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; Maybe (Char, index)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AbyteSplitAt"
>byteSplitAt</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AbyteTake"
>byteTake</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AbyteDrop"
>byteDrop</A
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
>Representation
</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t%3AUTF8"
></A
><B
>UTF8</B
> string </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>The type of strngs that are represented using tthe UTF8 encoding.
 The parameters is the type of the container for the representation.
</TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:UTF8')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:UTF8" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Eq string =&gt; Eq (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="decl"
>Ord string =&gt; Ord (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; Show (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>class</SPAN
> (Num s, Ord s) =&gt; <A NAME="t%3AUTF8Bytes"
></A
><B
>UTF8Bytes</B
> b s | b -&gt; s</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:UTF8Bytes')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:UTF8Bytes" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int64</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ByteString Int64</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ([] Word8) Int</TD
></TR
><TR
><TD CLASS="decl"
><A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> ([] Word8) Int</TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AfromString"
></A
><B
>fromString</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; String -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="doc"
>Converts a Haskell string into a UTF8 encoded string.
 Complexity: linear.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AtoString"
></A
><B
>toString</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; String</TD
></TR
><TR
><TD CLASS="doc"
>Convert a UTF8 encoded string into a Haskell string.
 Invalid characters are replaced by replacement_char.
 Complexity: linear.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AfromRep"
></A
><B
>fromRep</B
> ::  string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AtoRep"
></A
><B
>toRep</B
> ::  <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; string</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Areplacement_char"
></A
><B
>replacement_char</B
> :: Char</TD
></TR
><TR
><TD CLASS="doc"
>This character is used to mark errors in a UTF8 encoded string.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="2"
>Character based operations
</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Auncons"
></A
><B
>uncons</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; Maybe (Char, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="doc"
>Get the first character of a byte string, if any.
 Invalid characters are replaced by replacement_char.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AsplitAt"
></A
><B
>splitAt</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="doc"
>Split after a given number of characters.
 Negative values are treated as if they are 0.
 See also bytesSplitAt.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Atake"
></A
><B
>take</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="doc"
><TT
>take n s</TT
> returns the first <TT
>n</TT
> characters of <TT
>s</TT
>.
 If <TT
>s</TT
> has less then <TT
>n</TT
> characters, then we return the whole of <TT
>s</TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adrop"
></A
><B
>drop</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="doc"
><TT
>drop n s</TT
> returns the <TT
>s</TT
> without its first <TT
>n</TT
> characters.
 If <TT
>s</TT
> has less then <TT
>n</TT
> characters, then we return the an empty string.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aspan"
></A
><B
>span</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (Char -&gt; Bool) -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="doc"
>Split a string into two parts:  the first is the longest prefix
 that contains only characters that satisfy the predicate; the second
 part is the rest of the string.
 Invalid characters are passed as '\0xFFFD' to the predicate.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Abreak"
></A
><B
>break</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (Char -&gt; Bool) -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="doc"
>Split a string into two parts:  the first is the longest prefix
 that contains only characters that do not satisfy the predicate; the second
 part is the rest of the string.
 Invalid characters are passed as replacement_char to the predicate.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Afoldl"
></A
><B
>foldl</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (a -&gt; Char -&gt; a) -&gt; a -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; a</TD
></TR
><TR
><TD CLASS="doc"
>Traverse a bytestring (left biased).
 This fuction is strict in the accumulator.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Afoldr"
></A
><B
>foldr</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; (Char -&gt; a -&gt; a) -&gt; a -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; a</TD
></TR
><TR
><TD CLASS="doc"
>Traverse a bytestring (right biased).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Alength"
></A
><B
>length</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; index</TD
></TR
><TR
><TD CLASS="doc"
>Counts the number of characters encoded in the bytestring.
 Note that this includes replacment characters.
 The function is linear in the number of bytes in the representation.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Alines"
></A
><B
>lines</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; [<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string]</TD
></TR
><TR
><TD CLASS="doc"
>Split a string into a list of lines.
 Lines are termianted by '\n' or the end of the string.
 Empty line may not be terminated by the end of the string.
 See also 'lines\''.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Alines%27"
></A
><B
>lines'</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; [<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string]</TD
></TR
><TR
><TD CLASS="doc"
>Split a string into a list of lines.
 Lines are termianted by '\n' or the end of the string.
 Empty line may not be terminated by the end of the string.
 This function preserves the terminators.
 See also <TT
><A HREF="Data-String-UTF8.html#v%3Alines"
>lines</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="3"
>Representation based operations
</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Anull"
></A
><B
>null</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; Bool</TD
></TR
><TR
><TD CLASS="doc"
>Checks if there are no more bytes in the underlying representation.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adecode"
></A
><B
>decode</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; Maybe (Char, index)</TD
></TR
><TR
><TD CLASS="doc"
>Extract the first character for the underlying representation,
 if one is avaialble.  It also returns the number of bytes used
 in the representation of the character.
 See also <TT
><A HREF="Data-String-UTF8.html#v%3Auncons"
>uncons</A
></TT
>, dropBytes.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AbyteSplitAt"
></A
><B
>byteSplitAt</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; (<A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string, <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string)</TD
></TR
><TR
><TD CLASS="doc"
>Split after a given number of bytes in the underlying representation.
 See also <TT
><A HREF="Data-String-UTF8.html#v%3AsplitAt"
>splitAt</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AbyteTake"
></A
><B
>byteTake</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="doc"
>Take only the given number of bytes from the underlying representation.
 See also <TT
><A HREF="Data-String-UTF8.html#v%3Atake"
>take</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AbyteDrop"
></A
><B
>byteDrop</B
> :: <A HREF="Data-String-UTF8.html#t%3AUTF8Bytes"
>UTF8Bytes</A
> string index =&gt; index -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string -&gt; <A HREF="Data-String-UTF8.html#t%3AUTF8"
>UTF8</A
> string</TD
></TR
><TR
><TD CLASS="doc"
>Drop the given number of bytes from the underlying representation.
 See also <TT
><A HREF="Data-String-UTF8.html#v%3Adrop"
>drop</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.4.1</TD
></TR
></TABLE
></BODY
></HTML
>