Int -> a -> [a] +text
O(n) Splits a Text into components of length k. The last element may be shorter than the other chunks, depending on the length of the input. Examples:
> chunksOf 3 "foobarbaz" == ["foo","bar","baz"]
> chunksOf 4 "haskell.org" == ["hask","ell.","org"]
O(n) drop n, applied to a Text, returns the suffix of the Text after the first n characters, or the empty Text if n is greater than the length of the Text. Subject to fusion.
O(n*m) replicate n t is a Text consisting of the input t repeated n times.
O(n) take n, applied to a Text, returns the prefix of the Text of length n, or the Text itself if n is greater than the length of the Text. Subject to fusion.
O(n) Like unfoldr, unfoldrN builds a Text from a seed value. However, the length of the result should be limited by the first argument to unfoldrN. This function is more efficient than unfoldr when the maximum length of the result is known and correct, otherwise its performance is similar to unfoldr. Subject to fusion. Performs replacement on invalid scalar values.
O(n) Center a string to the given length, using the specified fill character on either side. Performs replacement on invalid scalar values.
Examples:
> center 8 'x' "HS" = "xxxHSxxx"
O(n) Left-justify a string to the given length, using the specified fill character on the right. Subject to fusion. Performs replacement on invalid scalar values.
Examples:
> justifyLeft 7 'x' "foo" == "fooxxxx"
> justifyLeft 3 'x' "foobar" == "foobar"
O(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values.
Examples:
> justifyRight 7 'x' "bar" == "xxxxbar"
> justifyRight 3 'x' "foobar" == "foobar"
Consume the chunks of a lazy Text with a strict, tail-recursive, accumulating left fold.
O(n) foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a Text, reduces the Text using the binary operator, from left to right. Subject to fusion.
O(n) A strict version of foldl. Subject to fusion.
Consume the chunks of a lazy Text with a natural right fold.
O(n) foldr, applied to a binary operator, a starting value (typically the right-identity of the operator), and a Text, reduces the Text using the binary operator, from right to left. Subject to fusion.