Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Rope.UTF16.Internal
Contents
- data Chunk = Chunk {
- chunkText :: !Text
- chunkMeasure :: !Position
- chunk :: Text -> Chunk
- newtype Rope = Rope {}
- chunkLength :: Int
- null :: Rope -> Bool
- toText :: Rope -> Text
- toLazyText :: Rope -> Text
- fromText :: Text -> Rope
- fromShortText :: Text -> Rope
- toString :: Rope -> String
- toChunks :: Rope -> [Text]
- unconsChunk :: Rope -> Maybe (Text, Rope)
- unsnocChunk :: Rope -> Maybe (Rope, Text)
- length :: Rope -> Int
- splitAt :: Int -> Rope -> (Rope, Rope)
- take :: Int -> Rope -> Rope
- drop :: Int -> Rope -> Rope
- rowColumnCodeUnits :: RowColumn -> Rope -> Int
- span :: (Char -> Bool) -> Rope -> (Rope, Rope)
- break :: (Char -> Bool) -> Rope -> (Rope, Rope)
- takeWhile :: (Char -> Bool) -> Rope -> Rope
- dropWhile :: (Char -> Bool) -> Rope -> Rope
Documentation
Constructors
Chunk | |
Fields
|
chunkLength :: Int Source #
The maximum length, in code units, of a chunk
Queries
Conversions to and from Text
and String
toLazyText :: Rope -> Text Source #
fromShortText :: Text -> Rope Source #
Chunking
unconsChunk :: Rope -> Maybe (Text, Rope) Source #
Get the first chunk and the rest of the Rope
if non-empty
unsnocChunk :: Rope -> Maybe (Rope, Text) Source #
Get the last chunk and the rest of the Rope
if non-empty
UTF-16 code unit indexing
rowColumnCodeUnits :: RowColumn -> Rope -> Int Source #
Get the code unit index in the rope that corresponds to a RowColumn
position
Since: 0.2.0.0