/usr/share/doc/libghc-utf8-string-doc/html/Data-String-UTF8.html is in libghc-utf8-string-doc 1.0.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.String.UTF8</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-String-UTF8.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-String-UTF8.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">utf8-string-1.0.1.1: Support for reading and writing UTF8 Strings</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) Iavor S. Diatchki 2009</td></tr><tr><th>License</th><td>BSD3-style (see LICENSE)</td></tr><tr><th>Maintainer</th><td>emertens@galois.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.String.UTF8</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Representation</a></li><li><a href="#g:2">Character based operations</a></li><li><a href="#g:3">Representation based operations</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:UTF8">UTF8</a> string</li><li class="src short"><span class="keyword">class</span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> s, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> s) => <a href="#t:UTF8Bytes">UTF8Bytes</a> b s | b -> s</li><li class="src short"><a href="#v:fromString">fromString</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string</li><li class="src short"><a href="#v:toString">toString</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:fromRep">fromRep</a> :: string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string</li><li class="src short"><a href="#v:toRep">toRep</a> :: <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> string</li><li class="src short"><a href="#v:replacement_char">replacement_char</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:uncons">uncons</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a>, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</li><li class="src short"><a href="#v:splitAt">splitAt</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</li><li class="src short"><a href="#v:take">take</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string</li><li class="src short"><a href="#v:drop">drop</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string</li><li class="src short"><a href="#v:span">span</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</li><li class="src short"><a href="#v:break">break</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</li><li class="src short"><a href="#v:foldl">foldl</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> a) -> a -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> a</li><li class="src short"><a href="#v:foldr">foldr</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> a -> a) -> a -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> a</li><li class="src short"><a href="#v:length">length</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> index</li><li class="src short"><a href="#v:lines">lines</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> [<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string]</li><li class="src short"><a href="#v:lines-39-">lines'</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> [<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string]</li><li class="src short"><a href="#v:null">null</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:decode">decode</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a>, index)</li><li class="src short"><a href="#v:byteSplitAt">byteSplitAt</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</li><li class="src short"><a href="#v:byteTake">byteTake</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string</li><li class="src short"><a href="#v:byteDrop">byteDrop</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string</li></ul></div><div id="interface"><h1 id="g:1">Representation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:UTF8" class="def">UTF8</a> string <a href="src/Data-String-UTF8.html#UTF8" class="link">Source</a></p><div class="doc"><p>The type of strings that are represented using the UTF8 encoding.
The parameter is the type of the container for the representation.</p></div><div class="subs instances"><p id="control.i:UTF8" class="caption collapser" onclick="toggleSection('i:UTF8')">Instances</p><div id="section.i:UTF8" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> string => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</span> <a href="src/Data-String-UTF8.html#line-54" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> string => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</span> <a href="src/Data-String-UTF8.html#line-54" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string)</span> <a href="src/Data-String-UTF8.html#line-56" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> s, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> s) => <a name="t:UTF8Bytes" class="def">UTF8Bytes</a> b s | b -> s <a href="src/Codec-Binary-UTF8-Generic.html#UTF8Bytes" class="link">Source</a></p><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Codec-Binary-UTF8-Generic.html#v:bsplit">bsplit</a>, <a href="Codec-Binary-UTF8-Generic.html#v:bdrop">bdrop</a>, <a href="Codec-Binary-UTF8-Generic.html#v:buncons">buncons</a>, <a href="Codec-Binary-UTF8-Generic.html#v:elemIndex">elemIndex</a>, <a href="Codec-Binary-UTF8-Generic.html#v:empty">empty</a>, <a href="Codec-Binary-UTF8-Generic.html#v:null">null</a>, <a href="Codec-Binary-UTF8-Generic.html#v:pack">pack</a>, <a href="Codec-Binary-UTF8-Generic.html#v:tail">tail</a></p></div><div class="subs instances"><p id="control.i:UTF8Bytes" class="caption collapser" onclick="toggleSection('i:UTF8Bytes')">Instances</p><div id="section.i:UTF8Bytes" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> <a href="Data-ByteString-Lazy-UTF8.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span> <a href="src/Codec-Binary-UTF8-Generic.html#line-68" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> <a href="Data-ByteString-UTF8.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></span> <a href="src/Codec-Binary-UTF8-Generic.html#line-58" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a>] <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></span> <a href="src/Codec-Binary-UTF8-Generic.html#line-78" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:fromString" class="def">fromString</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string <a href="src/Data-String-UTF8.html#fromString" class="link">Source</a></p><div class="doc"><p>Converts a Haskell string into a UTF8 encoded string.
Complexity: linear.</p></div></div><div class="top"><p class="src"><a name="v:toString" class="def">toString</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="src/Data-String-UTF8.html#toString" class="link">Source</a></p><div class="doc"><p>Convert a UTF8 encoded string into a Haskell string.
Invalid characters are replaced by <code>replacement_char</code>.
Complexity: linear.</p></div></div><div class="top"><p class="src"><a name="v:fromRep" class="def">fromRep</a> :: string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string <a href="src/Data-String-UTF8.html#fromRep" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toRep" class="def">toRep</a> :: <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> string <a href="src/Data-String-UTF8.html#toRep" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:replacement_char" class="def">replacement_char</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Codec-Binary-UTF8-Generic.html#replacement_char" class="link">Source</a></p><div class="doc"><p>This character is used to mark errors in a UTF8 encoded string.</p></div></div><h1 id="g:2">Character based operations</h1><div class="top"><p class="src"><a name="v:uncons" class="def">uncons</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a>, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string) <a href="src/Data-String-UTF8.html#uncons" class="link">Source</a></p><div class="doc"><p>Get the first character of a byte string, if any.
Invalid characters are replaced by <code>replacement_char</code>.</p></div></div><div class="top"><p class="src"><a name="v:splitAt" class="def">splitAt</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string) <a href="src/Data-String-UTF8.html#splitAt" class="link">Source</a></p><div class="doc"><p>Split after a given number of characters.
Negative values are treated as if they are 0.
See also <code>bytesSplitAt</code>.</p></div></div><div class="top"><p class="src"><a name="v:take" class="def">take</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string <a href="src/Data-String-UTF8.html#take" class="link">Source</a></p><div class="doc"><p><code>take n s</code> returns the first <code>n</code> characters of <code>s</code>.
If <code>s</code> has less than <code>n</code> characters, then we return the whole of <code>s</code>.</p></div></div><div class="top"><p class="src"><a name="v:drop" class="def">drop</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string <a href="src/Data-String-UTF8.html#drop" class="link">Source</a></p><div class="doc"><p><code>drop n s</code> returns the <code>s</code> without its first <code>n</code> characters.
If <code>s</code> has less than <code>n</code> characters, then we return an empty string.</p></div></div><div class="top"><p class="src"><a name="v:span" class="def">span</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string) <a href="src/Data-String-UTF8.html#span" class="link">Source</a></p><div class="doc"><p>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.</p></div></div><div class="top"><p class="src"><a name="v:break" class="def">break</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string) <a href="src/Data-String-UTF8.html#break" class="link">Source</a></p><div class="doc"><p>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 <code>replacement_char</code> to the predicate.</p></div></div><div class="top"><p class="src"><a name="v:foldl" class="def">foldl</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> a) -> a -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> a <a href="src/Data-String-UTF8.html#foldl" class="link">Source</a></p><div class="doc"><p>Traverse a bytestring (left biased).
This function is strict in the accumulator.</p></div></div><div class="top"><p class="src"><a name="v:foldr" class="def">foldr</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -> a -> a) -> a -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> a <a href="src/Data-String-UTF8.html#foldr" class="link">Source</a></p><div class="doc"><p>Traverse a bytestring (right biased).</p></div></div><div class="top"><p class="src"><a name="v:length" class="def">length</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> index <a href="src/Data-String-UTF8.html#length" class="link">Source</a></p><div class="doc"><p>Counts the number of characters encoded in the bytestring.
Note that this includes replacement characters.
The function is linear in the number of bytes in the representation.</p></div></div><div class="top"><p class="src"><a name="v:lines" class="def">lines</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> [<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string] <a href="src/Data-String-UTF8.html#lines" class="link">Source</a></p><div class="doc"><p>Split a string into a list of lines.
Lines are terminated by '\n' or the end of the string.
Empty lines may not be terminated by the end of the string.
See also 'lines\''.</p></div></div><div class="top"><p class="src"><a name="v:lines-39-" class="def">lines'</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> [<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string] <a href="src/Data-String-UTF8.html#lines%27" class="link">Source</a></p><div class="doc"><p>Split a string into a list of lines.
Lines are terminated by '\n' or the end of the string.
Empty lines may not be terminated by the end of the string.
This function preserves the terminators.
See also <code><a href="Data-String-UTF8.html#v:lines">lines</a></code>.</p></div></div><h1 id="g:3">Representation based operations</h1><div class="top"><p class="src"><a name="v:null" class="def">null</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-String-UTF8.html#null" class="link">Source</a></p><div class="doc"><p>Checks if there are no more bytes in the underlying representation.</p></div></div><div class="top"><p class="src"><a name="v:decode" class="def">decode</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a>, index) <a href="src/Data-String-UTF8.html#decode" class="link">Source</a></p><div class="doc"><p>Extract the first character for the underlying representation,
if one is available. It also returns the number of bytes used
in the representation of the character.
See also <code><a href="Data-String-UTF8.html#v:uncons">uncons</a></code>, <code>dropBytes</code>.</p></div></div><div class="top"><p class="src"><a name="v:byteSplitAt" class="def">byteSplitAt</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> (<a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string, <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string) <a href="src/Data-String-UTF8.html#byteSplitAt" class="link">Source</a></p><div class="doc"><p>Split after a given number of bytes in the underlying representation.
See also <code><a href="Data-String-UTF8.html#v:splitAt">splitAt</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:byteTake" class="def">byteTake</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string <a href="src/Data-String-UTF8.html#byteTake" class="link">Source</a></p><div class="doc"><p>Take only the given number of bytes from the underlying representation.
See also <code><a href="Data-String-UTF8.html#v:take">take</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:byteDrop" class="def">byteDrop</a> :: <a href="Data-String-UTF8.html#t:UTF8Bytes">UTF8Bytes</a> string index => index -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string -> <a href="Data-String-UTF8.html#t:UTF8">UTF8</a> string <a href="src/Data-String-UTF8.html#byteDrop" class="link">Source</a></p><div class="doc"><p>Drop the given number of bytes from the underlying representation.
See also <code><a href="Data-String-UTF8.html#v:drop">drop</a></code>.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|