Copyright | (c) Dong Han 2017-2018 |
---|---|
License | BSD |
Maintainer | winterland1989@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- elem :: Char -> Text -> Bool
- notElem :: Char -> Text -> Bool
- findIndices :: (Char -> Bool) -> Text -> [Int]
- find :: (Char -> Bool) -> Text -> (Int, Int, Maybe Char)
- findR :: (Char -> Bool) -> Text -> (Int, Int, Maybe Char)
- findIndex :: (Char -> Bool) -> Text -> Int
- findIndexR :: (Char -> Bool) -> Text -> Int
- filter :: (Char -> Bool) -> Text -> Text
- partition :: (Char -> Bool) -> Text -> (Text, Text)
element-wise search
Searching by equality
O(n) find the first char matching the predicate in a text from left to right, if there isn't one, return the index point to the end of the byte slice.
findR :: (Char -> Bool) -> Text -> (Int, Int, Maybe Char) Source #
O(n) find the first char matching the predicate in a text from right to left, if there isn't one, return the index point to the end of the byte slice.
findIndexR :: (Char -> Bool) -> Text -> Int Source #
O(n) find the index of the byte slice in reverse order.