ByteString
Types
BS
Functions
O(1). A ByteString containing a single byte.
O(n). Convert a list of bytes to a ByteString.
O(n). Convert a ByteString to a list of bytes.
Identity (strict ByteString is already strict).
Identity (strict ByteString is already strict).
O(n). Prepend a byte to a ByteString.
O(n). Append a byte to a ByteString.
O(n). Append two ByteStrings.
O(1). Extract the first byte of a ByteString.
O(1). Decompose a ByteString into its head and tail.
O(1). Decompose a ByteString into its init and last.
O(1). Extract the last byte of a ByteString.
O(1). Extract the bytes after the head of a ByteString.
O(1). All bytes except the last.
O(1). Test whether a ByteString is empty.
O(1). The length of a ByteString.
Map a function over a ByteString.
Reverse a ByteString.
Intersperse a byte between bytes of a ByteString.
Join a list of ByteStrings with a separator.
Transpose the rows and columns of a list of ByteStrings.
Left fold.
Strict left fold.
Left fold on non-empty ByteStrings.
Strict left fold on non-empty ByteStrings.
Right fold.
Strict right fold.
Right fold on non-empty ByteStrings.
Strict right fold on non-empty ByteStrings.
Concatenate a list of ByteStrings.
Map a function and concatenate results.
Test if any byte satisfies a predicate.
Test if all bytes satisfy a predicate.
Maximum byte value.
Minimum byte value.
Left scan.
Left scan without starting value.
Right scan.
Right scan without starting value.
Accumulating map from left.
Accumulating map from right.
Replicate a byte n times.
Build a ByteString from a seed using unfoldr.
Build a ByteString with at most n bytes from unfoldr.
O(1). Take the first @n@ bytes of a ByteString.
O(1). Take the last @n@ bytes of a ByteString.
O(1). Drop the first @n@ bytes of a ByteString.
O(1). Drop the last @n@ bytes of a ByteString.
O(1). Split a ByteString at position @n@.
Take bytes while predicate holds.
Take bytes from end while predicate holds.
Drop bytes while predicate holds.
Drop bytes from end while predicate holds.
Split at first byte where predicate fails.
Split from end at first byte where predicate fails.
Split at first byte where predicate succeeds.
Split from end at first byte where predicate succeeds.
Group consecutive equal bytes.
Group consecutive bytes by a predicate.
All initial segments.
All final segments.
Strip a prefix if present.
Strip a suffix if present.
Split on a byte.
Split on bytes satisfying a predicate.
Split on a delimiter ByteString.
Is the first a prefix of the second?
Is the first a suffix of the second?
Is the first contained in the second?
Is the byte in the ByteString?
Is the byte not in the ByteString?
Find the first byte satisfying a predicate.
Filter bytes by a predicate.
Partition by a predicate.
Index a byte (partial).
Safe indexing.
Infix safe indexing.
Index of first occurrence.
Indices of all occurrences.
Index of last occurrence.
Index of first byte satisfying a predicate.
Indices of all bytes satisfying a predicate.
Index of last byte satisfying a predicate.
Count occurrences of a byte.
Zip two ByteStrings.
Zip with a function.
Zip with a function producing bytes.
Unzip a list of pairs.
Sort bytes in ascending order.
Make a copy of the ByteString.
Pack a null-terminated C string.
Pack a C string with known length.
Use a ByteString as a null-terminated C string.
Use a ByteString as a C string with length.
Read a line from stdin.
Read all of stdin.
Write to stdout.
Write to stdout with newline.
Process stdin to stdout.
Read an entire file.
Write to a file.
Append to a file.
Read a line from a handle.
Read all remaining data from a handle.
Read exactly n bytes from a handle.
Read up to n bytes from a handle.
Non-blocking read.
Write to a handle.
Non-blocking write.
Write to a handle (alias).
Write to a handle with newline.