ollef / rope-utf16-splay

Thick strings optimised for indexing and updating using UTF-16 code units and row/column pairs
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

splitAtLine missing #2

Closed alanz closed 5 years ago

alanz commented 5 years ago

We are using this in haskell-ide-engine at https://github.com/haskell/haskell-ide-engine/blob/master/hie-plugin-api/Haskell/Ide/Engine/PluginUtils.hs#L288-L293

alanz commented 5 years ago

cc @ndmitchell

alanz commented 5 years ago

And it looks like it can be done using some combination of span, takeWhile, dropWhile.

alanz commented 5 years ago

or feeding the output of rowColumnCodeUnits to splitAt.

ollef commented 5 years ago

Added in version 0.3.1.0.