Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Data.Text
- module Data.Text.Encoding
- decodeUtf8M :: ByteString -> Fail Text
- showText :: Show a => a -> Text
- readText :: Read a => Text -> a
- groupOn :: Eq a => (Char -> a) -> Text -> [(a, Text)]
- withoutTags :: Text -> Text
- showTable :: Traversable t => [(Text, a -> Text)] -> t a -> Text
- showTableRaw :: (Traversable t1, Traversable t2) => [Text] -> t1 (t2 Text) -> Text
- filename :: Text -> Text
- splitOnNoEmpty :: Text -> Text -> [Text]
- nothingIfEmpty :: Text -> Maybe Text
- noneIfEmpty :: Text -> Option Text
- emptyIfNone :: Option Text -> Text
- limitTo :: Int -> Text -> Text
- sep :: Text -> Char -> Text -> Text
- unsep :: Char -> Text -> (Text, Text)
- unsep' :: Monad m => Char -> Text -> m (Text, Text)
- shorten :: Int -> Text -> Text
- shortenL :: Int -> Text -> Text
- firstToUpper :: Text -> Text
- shortenLinesL :: Int -> Int -> Text -> Text
- lenientDecodeUtf8 :: ByteString -> Text
- lenientDecodeUtf8L :: ByteString -> Text
- toLazy :: Text -> Text
- fromLazy :: Text -> Text
- indicesOfOccurences :: Text -> Text -> [Int]
- tokenize :: Text -> [Text]
- commonPrefixTotal :: Text -> Text -> (Text, Text, Text)
- firstLine :: Text -> Text
- firstParagraph :: Text -> Text
- escapeXml :: Text -> Text
- fixed :: Int -> Text -> Text
- fixed' :: Char -> Int -> Text -> Text
Documentation
module Data.Text
module Data.Text.Encoding
decodeUtf8M :: ByteString -> Fail Text Source #
withoutTags :: Text -> Text Source #
Removes HTML Tags
showTableRaw :: (Traversable t1, Traversable t2) => [Text] -> t1 (t2 Text) -> Text Source #
firstToUpper :: Text -> Text Source #
lenientDecodeUtf8 :: ByteString -> Text Source #
lenientDecodeUtf8L :: ByteString -> Text Source #
tokenize :: Text -> [Text] Source #
Simple tokenizer - that doesn't destroy delimiters, e.g.
>>>
tokenize (T.pack "This is blind-text, with punctuation.")
["This"," ","is"," ","blind","-","text",", ","with"," ","punctuation","."]
T.concat (tokenize x) == x
Note: URLs, numbers won't be handled very well.
firstParagraph :: Text -> Text Source #