|
|
|
|
|
|
Synopsis |
|
|
|
|
Representation
|
|
|
The type of strngs that are represented using tthe UTF8 encoding.
The parameters is the type of the container for the representation.
| Instances | |
|
|
|
| Instances | |
|
|
|
Converts a Haskell string into a UTF8 encoded string.
Complexity: linear.
|
|
|
Convert a UTF8 encoded string into a Haskell string.
Invalid characters are replaced by replacement_char.
Complexity: linear.
|
|
|
|
|
|
|
This character is used to mark errors in a UTF8 encoded string.
|
|
Character based operations
|
|
|
Get the first character of a byte string, if any.
Invalid characters are replaced by replacement_char.
|
|
|
Split after a given number of characters.
Negative values are treated as if they are 0.
See also bytesSplitAt.
|
|
|
take n s returns the first n characters of s.
If s has less then n characters, then we return the whole of s.
|
|
|
drop n s returns the s without its first n characters.
If s has less then n characters, then we return the an empty string.
|
|
|
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.
|
|
|
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.
|
|
|
Traverse a bytestring (left biased).
This fuction is strict in the accumulator.
|
|
|
Traverse a bytestring (right biased).
|
|
|
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.
|
|
|
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\''.
|
|
|
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 lines.
|
|
Representation based operations
|
|
|
Checks if there are no more bytes in the underlying representation.
|
|
|
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 uncons, dropBytes.
|
|
|
Split after a given number of bytes in the underlying representation.
See also splitAt.
|
|
|
Take only the given number of bytes from the underlying representation.
See also take.
|
|
|
Drop the given number of bytes from the underlying representation.
See also drop.
|
|
Produced by Haddock version 2.6.0 |