Ropes (concatenation trees) for strings in D ?

MrSmith via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 16 03:25:01 PDT 2014


On Saturday, 16 August 2014 at 02:26:29 UTC, ketmar via 
Digitalmars-d-learn wrote:
> On Fri, 15 Aug 2014 19:04:10 -0700
> Timothee Cour via Digitalmars-d-learn
> <digitalmars-d-learn at puremagic.com> wrote:
>
> sounds like my C library based on this article:
> http://e98cuenc.free.fr/wordprocessor/piecetable.html
>
> i'm slowly converting my C code to D (nothing fancy yet, still 
> C-style).
>
> it's not a 'real' rope -- it's designed for text editing tasks, 
> and it
> allocates like crazy now, but it's pretty usable to writing 
> rich text
> editors and renderers in various GUI toolkits.
>
> don't know when i'll finish first working version though, it's 
> all
> little tedious and i have alot other things to do. but i'll 
> announce it
> when it will be done. ;-)

I've done some progress on making piece table some time ago, but 
have no time atm.
Have a look https://github.com/MrSmith33/textedit-d
It supports inserting, removing, undo, redo and slicing. Provides 
forward range interface. Can you also share your progress?


More information about the Digitalmars-d-learn mailing list