Ord a => [a] -> [a] -base -quickcheck +bytestring
O(n) Concatenate a list of ByteStrings.
unlines is an inverse operation to lines. It joins lines, after appending a terminating newline to each.
The group function takes a ByteString and returns a list of ByteStrings such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,
> group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]
It is a special case of groupBy, which allows the programmer to supply their own equality test.
The group function takes a ByteString and returns a list of ByteStrings such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,
> group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]
It is a special case of groupBy, which allows the programmer to supply their own equality test. It is about 40% faster than groupBy (==)
O(n) Return all initial segments of the given ByteString, shortest first.
lines breaks a ByteString up into a list of ByteStrings at newline Chars. The resulting strings do not contain newlines.
lines breaks a ByteString up into a list of ByteStrings at newline Chars. The resulting strings do not contain newlines.
As of bytestring 0.9.0.3, this function is stricter than its list cousin.
O(n) Return all final segments of the given ByteString, longest first.
words breaks a ByteString up into a list of words, which were delimited by Chars representing white space.
words breaks a ByteString up into a list of words, which were delimited by Chars representing white space. And
> tokens isSpace = words
O(n) The intercalate function takes a ByteString and a list of ByteStrings and concatenates the list after interspersing the first argument between each element of the list.
The groupBy function is the non-overloaded version of group.
O(n) Splits a ByteString into components delimited by separators, The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg.
> splitWith (=='a') "aabbaca" == ["","","bb","c",""]
> splitWith (=='a') [] == []
The groupBy function is the non-overloaded version of group.
O(n) Splits a ByteString into components delimited by separators, The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg.
> splitWith (=='a') "aabbaca" == ["","","bb","c",""]
O(n) Break a ByteString into pieces separated by the byte argument, consuming the delimiter. I.e.
> split '\n' "a\nb\nd\ne" == ["a","b","d","e"]
> split 'a' "aXaXaXa" == ["","X","X","X",""]
> split 'x' "x" == ["",""]
and
> intercalate [c] . split c == id
> split == splitWith . (==)
As for all splitting functions in this library, this function does not copy the substrings, it just constructs new ByteStrings that are slices of the original.
Show more results