Ord a => [a] -> [a] -base +text

transpose :: [Text] -> [Text]
text Data.Text, text Data.Text.Lazy
O(n) The transpose function transposes the rows and columns of its Text argument. Note that this function uses pack, unpack, and the list version of transpose, and is thus not very efficient.
concat :: [Text] -> Text
text Data.Text, text Data.Text.Lazy
O(n) Concatenate a list of Texts.
fromChunks :: [Text] -> Text
text Data.Text.Lazy
O(c) Convert a list of strict Texts into a lazy Text.
unlines :: [Text] -> Text
text Data.Text, text Data.Text.Lazy
O(n) Joins lines, after appending a terminating newline to each.
unwords :: [Text] -> Text
text Data.Text, text Data.Text.Lazy
O(n) Joins words using single space characters.
group :: Text -> [Text]
text Data.Text
O(n) Group characters in a string by equality.
group :: Text -> [Text]
text Data.Text.Lazy
The group function takes a Text and returns a list of Texts 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.
inits :: Text -> [Text]
text Data.Text, text Data.Text.Lazy
O(n) Return all initial segments of the given Text, shortest first.
lines :: Text -> [Text]
text Data.Text, text Data.Text.Lazy
O(n) Breaks a Text up into a list of Texts at newline Chars. The resulting strings do not contain newlines.
tails :: Text -> [Text]
text Data.Text, text Data.Text.Lazy
O(n) Return all final segments of the given Text, longest first.
toChunks :: Text -> [Text]
text Data.Text.Lazy
O(n) Convert a lazy Text into a list of strict Texts.
words :: Text -> [Text]
text Data.Text, text Data.Text.Lazy
O(n) Breaks a Text up into a list of words, delimited by Chars representing white space.
intercalate :: Text -> [Text] -> Text
text Data.Text, text Data.Text.Lazy
O(n) The intercalate function takes a Text and a list of Texts and concatenates the list after interspersing the first argument between each element of the list.
groupBy :: (Char -> Char -> Bool) -> Text -> [Text]
text Data.Text
O(n) Group characters in a string according to a predicate.
groupBy :: (Char -> Char -> Bool) -> Text -> [Text]
text Data.Text.Lazy
The groupBy function is the non-overloaded version of group.
split :: (Char -> Bool) -> Text -> [Text]
text Data.Text
O(n) Splits a Text 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. > split (=='a') "aabbaca" == ["","","bb","c",""] > split (=='a') "" == [""]
split :: (Char -> Bool) -> Text -> [Text]
text Data.Text.Lazy
O(n) Splits a Text 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. > split (=='a') "aabbaca" == ["","","bb","c",""] > split (=='a') [] == [""]
splitOn :: Text -> Text -> [Text]
text Data.Text
O(m+n) Break a Text into pieces separated by the first Text argument, consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. Examples: > splitOn "\r\n" "a\r\nb\r\nd\r\ne" == ["a","b","d","e"] > splitOn "aaa" "aaaXaaaXaaaXaaa" == ["","X","X","X",""] > splitOn "x" "x" == ["",""] and > intercalate s . splitOn s == id > splitOn (singleton c) == split (==c) In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).
splitOn :: Text -> Text -> [Text]
text Data.Text.Lazy
O(m+n) Break a Text into pieces separated by the first Text argument, consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. Examples: > splitOn "\r\n" "a\r\nb\r\nd\r\ne" == ["a","b","d","e"] > splitOn "aaa" "aaaXaaaXaaaXaaa" == ["","X","X","X",""] > splitOn "x" "x" == ["",""] and > intercalate s . splitOn s == id > splitOn (singleton c) == split (==c) This function is strict in its first argument, and lazy in its second. In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).
chunksOf :: Int64 -> Text -> [Text]
text Data.Text.Lazy
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"]
chunksOf :: Int -> Text -> [Text]
text Data.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"]
safe :: Char -> Char
text Data.Text.Internal
Map a Char to a Text-safe value. UTF-16 surrogate code points are not included in the set of Unicode scalar values, but are unfortunately admitted as valid Char values by Haskell. They cannot be represented in a Text. This function remaps those code points to the Unicode replacement character (U+FFFD, ''), and leaves other code points unchanged.
copy :: Text -> Text
text Data.Text
O(n) Make a distinct copy of the given string, sharing no storage with the original string. As an example, suppose you read a large string, of which you need only a small portion. If you do not use copy, the entire original array will be kept alive in memory by the smaller string. Making a copy "breaks the link" to the original array, allowing it to be garbage collected if there are no other live references to it.
fromStrict :: Text -> Text
text Data.Text.Lazy
O(c) Convert a strict Text into a lazy Text.
init :: Text -> Text
text Data.Text, text Data.Text.Lazy
O(1) Returns all but the last character of a Text, which must be non-empty. Subject to fusion.
lazyInvariant :: Text -> Text
text Data.Text.Lazy.Internal
Check the invariant lazily.
reverse :: Text -> Text
text Data.Text.Lazy
O(n) reverse t returns the elements of t in reverse order.
reverse :: Text -> Text
text Data.Text
O(n) Reverse the characters of a string. Subject to fusion.
strip :: Text -> Text
text Data.Text, text Data.Text.Lazy
O(n) Remove leading and trailing white space from a string. Equivalent to: > dropAround isSpace
stripEnd :: Text -> Text
text Data.Text, text Data.Text.Lazy
O(n) Remove trailing white space from a string. Equivalent to: > dropWhileEnd isSpace
stripStart :: Text -> Text
text Data.Text, text Data.Text.Lazy
O(n) Remove leading white space from a string. Equivalent to: > dropWhile isSpace
tail :: Text -> Text
text Data.Text, text Data.Text.Lazy
O(1) Returns all characters after the head of a Text, which must be non-empty. Subject to fusion.
toCaseFold :: Text -> Text
text Data.Text
O(n) Convert a string to folded case. This function is mainly useful for performing caseless (also known as case insensitive) string comparisons. A string x is a caseless match for a string y if and only if: > toCaseFold x == toCaseFold y The result string may be longer than the input string, and may differ from applying toLower to the input string. For instance, the Armenian small ligature "" (men now, U+FB13) is case folded to the sequence "t" (men, U+0574) followed by "v" (now, U+0576), while the Greek "" (micro sign, U+00B5) is case folded to "" (small letter mu, U+03BC) instead of itself.
toCaseFold :: Text -> Text
text Data.Text.Lazy
O(n) Convert a string to folded case. This function is mainly useful for performing caseless (or case insensitive) string comparisons. A string x is a caseless match for a string y if and only if: > toCaseFold x == toCaseFold y The result string may be longer than the input string, and may differ from applying toLower to the input string. For instance, the Armenian small ligature men now (U+FB13) is case folded to the bigram men now (U+0574 U+0576), while the micro sign (U+00B5) is case folded to the Greek small letter letter mu (U+03BC) instead of itself.
toLower :: Text -> Text
text Data.Text
O(n) Convert a string to lower case, using simple case conversion. The result string may be longer than the input string. For instance, "0" (Latin capital letter I with dot above, U+0130) maps to the sequence "i" (Latin small letter i, U+0069) followed by " " (combining dot above, U+0307).
toLower :: Text -> Text
text Data.Text.Lazy
O(n) Convert a string to lower case, using simple case conversion. The result string may be longer than the input string. For instance, the Latin capital letter I with dot above (U+0130) maps to the sequence Latin small letter i (U+0069) followed by combining dot above (U+0307).
toStrict :: Text -> Text
text Data.Text.Lazy
O(n) Convert a lazy Text into a strict Text.
toUpper :: Text -> Text
text Data.Text
O(n) Convert a string to upper case, using simple case conversion. The result string may be longer than the input string. For instance, the German "" (eszett, U+00DF) maps to the two-letter sequence "SS".
toUpper :: Text -> Text
text Data.Text.Lazy
O(n) Convert a string to upper case, using simple case conversion. The result string may be longer than the input string. For instance, the German eszett (U+00DF) maps to the two-letter sequence SS.
unsafeTail :: Text -> Text
text Data.Text.Unsafe
O(1) A variant of tail for non-empty Text. unsafeHead omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the Text is non-empty.

Show more results