Is there a public implementation of the Rope data structure in C#?
+10
A:
I'm not aware of a Rope implementation (though there probably is one!), but if you're only after doing concatenation, StringBuilder will do the job.
Richard
2009-12-07 21:04:40
Very true here. I did an implementation in C# a while ago where I used a 'linked list' of char arrays and no matter what, it could not beat the StringBuilder class. The problem comes when you are trying to tie those together for concatenation, you do not have access to a couple of native methods that the StringBuilder class has access to for allocating a buffer and copying the characters in.
esac
2009-12-15 17:42:05
+10
A:
For what its worth, here is an immutable Java implementation. You could probably convert it to C# in less than an hour.
Juliet
2009-12-12 17:56:29
Heh, this is a reference in the wikipedia article the poster linked to! :)
Vinko Vrsalovic
2009-12-15 20:50:03